mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
chore(tree): add props icon
This commit is contained in:
parent
9c67b78b64
commit
3eeb5a8802
@ -32,6 +32,10 @@ export default {
|
||||
checked: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
icon: {
|
||||
type: Function,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -101,7 +105,9 @@ export default {
|
||||
}, [
|
||||
this.data.label
|
||||
]),
|
||||
this.$slots.default
|
||||
(
|
||||
this.icon && typeof this.icon === 'function' ? [this.icon()] : []
|
||||
).concat(this.$slots.default)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user