fix tree hideicon

This commit is contained in:
2023-04-25 09:25:44 +08:00
parent e293b80814
commit eab2a7b52e
5 changed files with 28 additions and 14 deletions

View File

@@ -17620,7 +17620,8 @@ const _sfc_main$K = defineComponent({
selectedKey: null,
checkStrictly: { type: [Boolean, String] },
collapseTransition: { type: Boolean },
onlyIconControl: { type: Boolean }
onlyIconControl: { type: Boolean },
hideicon: { type: Boolean }
},
emits: ["node-click"],
setup(__props, { emit }) {
@@ -17639,6 +17640,9 @@ const _sfc_main$K = defineComponent({
if (node.children.length !== 0) {
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
}
if (props.hideicon) {
return "";
}
return "layui-icon-file";
};
function recursiveNodeClick(node) {
@@ -17758,6 +17762,7 @@ const _sfc_main$K = defineComponent({
"collapse-transition": __props.collapseTransition,
checkStrictly: __props.checkStrictly,
"only-icon-control": __props.onlyIconControl,
hideicon: props.hideicon,
onNodeClick: recursiveNodeClick
}, createSlots({ _: 2 }, [
_ctx.$slots.title ? {
@@ -17769,7 +17774,7 @@ const _sfc_main$K = defineComponent({
]),
key: "0"
} : void 0
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control"])
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control", "hideicon"])
])) : createCommentVNode("", true)
]),
_: 2
@@ -17974,7 +17979,8 @@ const _sfc_main$J = defineComponent({
children: "children",
title: "title"
};
} }
} },
hideicon: { type: Boolean }
},
emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
setup(__props, { emit }) {
@@ -18036,7 +18042,8 @@ const _sfc_main$J = defineComponent({
"check-strictly": __props.checkStrictly,
"collapse-transition": __props.collapseTransition,
"only-icon-control": __props.onlyIconControl,
onNodeClick: handleClick
onNodeClick: handleClick,
hideicon: props.hideicon
}, createSlots({ _: 2 }, [
_ctx.$slots.title ? {
name: "title",
@@ -18045,7 +18052,7 @@ const _sfc_main$J = defineComponent({
]),
key: "0"
} : void 0
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control"])
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control", "hideicon"])
], 2);
};
}