diff --git a/packages/common/Tree/src/TreeNode.js b/packages/common/Tree/src/TreeNode.js index 67f10e31a..727d20c2f 100644 --- a/packages/common/Tree/src/TreeNode.js +++ b/packages/common/Tree/src/TreeNode.js @@ -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) ]) } }