add soultable 下载名称 自动隐藏

This commit is contained in:
2023-05-05 09:58:29 +08:00
parent cb5a696c09
commit 1686971f8c
12 changed files with 317 additions and 202 deletions

View File

@@ -23,7 +23,8 @@ const _sfc_main$1 = 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 }) {
@@ -42,6 +43,9 @@ const _sfc_main$1 = 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) {
@@ -161,6 +165,7 @@ const _sfc_main$1 = defineComponent({
"collapse-transition": __props.collapseTransition,
checkStrictly: __props.checkStrictly,
"only-icon-control": __props.onlyIconControl,
hideicon: props.hideicon,
onNodeClick: recursiveNodeClick
}, createSlots({ _: 2 }, [
_ctx.$slots.title ? {
@@ -172,7 +177,7 @@ const _sfc_main$1 = 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
@@ -377,7 +382,8 @@ const _sfc_main = defineComponent({
children: "children",
title: "title"
};
} }
} },
hideicon: { type: Boolean }
},
emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
setup(__props, { emit }) {
@@ -439,7 +445,8 @@ const _sfc_main = 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",
@@ -448,7 +455,7 @@ const _sfc_main = 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);
};
}