diff --git a/src/component/tree/TreeNode.vue b/src/component/tree/TreeNode.vue index 3d7c8cb..90b38d7 100644 --- a/src/component/tree/TreeNode.vue +++ b/src/component/tree/TreeNode.vue @@ -35,6 +35,7 @@ export interface TreeNodeProps { checkStrictly: boolean | string; collapseTransition: boolean; onlyIconControl: boolean; + hideicon?: boolean; } interface TreeNodeEmits { @@ -69,6 +70,9 @@ const nodeIconType = (node: TreeData): string => { if (node.children.length !== 0) { return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction"; } + if(props.hideicon){ + return "" + } return "layui-icon-file"; }; @@ -193,6 +197,7 @@ const isChildAllSelected = computed(() => { :collapse-transition="collapseTransition" :checkStrictly="checkStrictly" :only-icon-control="onlyIconControl" + :hideico="props.hideicon" @node-click="recursiveNodeClick" >