add soultable 下载名称 自动隐藏

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

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,7 @@ const _hoisted_8$2 = {
class: "layui-table-cell-expand-icon-spaced" class: "layui-table-cell-expand-icon-spaced"
}; };
const _hoisted_9$2 = ["colspan", "rowspan", "onClick"]; const _hoisted_9$2 = ["colspan", "rowspan", "onClick"];
const _hoisted_10$1 = { const _hoisted_10$2 = {
key: 1, key: 1,
class: "layui-table-cell-expand-icon-spaced" class: "layui-table-cell-expand-icon-spaced"
}; };
@ -464,7 +464,7 @@ const _sfc_main$3 = defineComponent({
key: 0, key: 0,
style: normalizeStyle({ "margin-right": __props.currentIndentSize + "px" }) style: normalizeStyle({ "margin-right": __props.currentIndentSize + "px" })
}, null, 4)) : createCommentVNode("", true), }, null, 4)) : createCommentVNode("", true),
__props.expandSpace && !__props.data[__props.childrenColumnName] && !unref(slot).expand && columnIndex === __props.expandIndex ? (openBlock(), createElementBlock("span", _hoisted_10$1)) : createCommentVNode("", true), __props.expandSpace && !__props.data[__props.childrenColumnName] && !unref(slot).expand && columnIndex === __props.expandIndex ? (openBlock(), createElementBlock("span", _hoisted_10$2)) : createCommentVNode("", true),
(unref(slot).expand || __props.data[__props.childrenColumnName]) && columnIndex === __props.expandIndex ? (openBlock(), createBlock(unref(_sfc_main$2E), { (unref(slot).expand || __props.data[__props.childrenColumnName]) && columnIndex === __props.expandIndex ? (openBlock(), createBlock(unref(_sfc_main$2E), {
key: 2, key: 2,
class: "layui-table-cell-expand-icon", class: "layui-table-cell-expand-icon",
@ -637,34 +637,48 @@ const _sfc_main$2 = defineComponent({
}; };
} }
}); });
var soultable = /* @__PURE__ */ (() => ".soulbox{background-color:#333;color:#fff;display:inline-block;position:absolute;z-index:2147483647;min-width:160px;max-width:300px;overflow-y:auto;border:1px solid #e6e6e6;border-radius:5px;box-shadow:2px 2px 4px -2px #0003}\n")(); var soultable = /* @__PURE__ */ (() => ".soulbox{background-color:#333;color:#fff;display:inline-block;position:absolute;z-index:2147483647;min-width:160px;max-width:320px;overflow-y:auto;border:1px solid #e6e6e6;border-radius:5px;box-shadow:2px 2px 4px -2px #0003}\n")();
const _hoisted_1$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-asc" }, null, -1); const _hoisted_1$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-asc" }, null, -1);
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-desc" }, null, -1); const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-desc" }, null, -1);
const _hoisted_3$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-drop-list" }, null, -1); const _hoisted_3$1 = /* @__PURE__ */ createElementVNode("li", {
const _hoisted_4$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-dropList",
class: "layui-icon layui-icon-right", style: {},
style: { "float": "right" } show: "select"
}, null, -1); }, [
/* @__PURE__ */ createElementVNode("i", {
class: "soul-icon soul-icon-drop-list",
show: "select"
}),
/* @__PURE__ */ createTextVNode(" \u7B5B\u9009\u6570\u636E "),
/* @__PURE__ */ createElementVNode("i", {
class: "layui-icon layui-icon-right",
style: { "float": "right" },
show: "select"
})
], -1);
const _hoisted_4$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-download" }, null, -1);
const _hoisted_5$1 = { const _hoisted_5$1 = {
class: "soulbox", class: "soulbox",
style: { "left": "100%", "top": "65px" } style: { "left": "100%", "top": "65px" }
}; };
const _hoisted_6$1 = { const _hoisted_6$1 = {
class: "check", class: "check",
style: { "min-width": "180px" } style: { "min-width": "190px" }
}; };
const _hoisted_7$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE623", -1); const _hoisted_7$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE623", -1);
const _hoisted_8$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE63E", -1); const _hoisted_8$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE63E", -1);
const _hoisted_9$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE614", -1); const _hoisted_9$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE614", -1);
const _hoisted_10$1 = { style: { "max-height": "300px", "overflow": "auto" } };
const _sfc_main$1 = defineComponent({ const _sfc_main$1 = defineComponent({
__name: "soultable", __name: "soultable",
props: { props: {
left: { default: 10 }, left: { default: 10 },
top: { default: 10 }, top: { default: 10 },
list: { default: [] }, list: { default: [] },
soulkey: { default: "" } soulkey: { default: "" },
show: { type: Boolean, default: false }
}, },
emits: ["asc", "desc", "sx"], emits: ["asc", "desc", "sx", "daochu"],
setup(__props, { emit }) { setup(__props, { emit }) {
const props = __props; const props = __props;
function asc(event) { function asc(event) {
@ -673,18 +687,20 @@ const _sfc_main$1 = defineComponent({
function desc(event) { function desc(event) {
emit("desc", event); emit("desc", event);
} }
function daochu() {
emit("daochu");
}
const sel = ref([]); const sel = ref([]);
const list = ref([]); const list = ref([]);
const alllist = ref([]); const alllist = ref([]);
watch(() => [props.list, props.soulkey], () => { watch(() => [props.show], () => {
let set = /* @__PURE__ */ new Set(); let set = /* @__PURE__ */ new Set();
for (let i of props.list) { for (let i of props.list) {
set.add(i[props.soulkey]); set.add(i[props.soulkey]);
console.log(i, i[props.soulkey]);
} }
alllist.value = Array.from(set); alllist.value = Array.from(set);
list.value = alllist.value; list.value = alllist.value;
console.log(list.value); selshow.value = false;
}, { deep: true }); }, { deep: true });
const seltext = ref(""); const seltext = ref("");
watch(seltext, () => { watch(seltext, () => {
@ -724,14 +740,22 @@ const _sfc_main$1 = defineComponent({
} }
} }
const selshow = ref(false); const selshow = ref(false);
function shubiao(event) {
console.log(event, 160);
if (event.target.getAttribute("show") == "select") {
selshow.value = true;
} else {
selshow.value = false;
}
}
return (_ctx, _cache) => { return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", { return openBlock(), createElementBlock("div", {
class: "soulbox", class: "soulbox",
style: normalizeStyle(`top: ${props.top}px;left:${props.left}px`), style: normalizeStyle(`top: ${props.top}px;left:${props.left}px`),
onClick: _cache[6] || (_cache[6] = withModifiers(() => { onClick: _cache[5] || (_cache[5] = withModifiers(() => {
}, ["stop"])) }, ["stop"]))
}, [ }, [
createElementVNode("ul", null, [ createElementVNode("ul", { onMouseover: shubiao }, [
createElementVNode("li", { createElementVNode("li", {
onClick: asc, onClick: asc,
class: "soul-sort", class: "soul-sort",
@ -750,21 +774,22 @@ const _sfc_main$1 = defineComponent({
_hoisted_2$1, _hoisted_2$1,
createTextVNode(" \u964D\u5E8F\u6392\u5217 ") createTextVNode(" \u964D\u5E8F\u6392\u5217 ")
]), ]),
_hoisted_3$1,
createElementVNode("li", { createElementVNode("li", {
class: "soul-dropList", onClick: daochu,
style: {}, class: "soul-sort",
onMouseover: _cache[0] || (_cache[0] = ($event) => selshow.value = true) "data-value": "desc",
style: { "border-bottom": "1px solid rgb(230, 230, 230)" }
}, [ }, [
_hoisted_3$1, _hoisted_4$1,
createTextVNode(" \u7B5B\u9009\u6570\u636E "), createTextVNode(" \u5BFC\u51FAexcel ")
_hoisted_4$1 ])
], 32) ], 32),
]),
withDirectives(createElementVNode("div", _hoisted_5$1, [ withDirectives(createElementVNode("div", _hoisted_5$1, [
createVNode(_sfc_main$8, { createVNode(_sfc_main$8, {
"prefix-icon": "layui-icon-search", "prefix-icon": "layui-icon-search",
modelValue: seltext.value, modelValue: seltext.value,
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => seltext.value = $event), "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seltext.value = $event),
size: "sm", size: "sm",
placeholder: "\u5173\u952E\u5B57\u641C\u7D22" placeholder: "\u5173\u952E\u5B57\u641C\u7D22"
}, null, 8, ["modelValue"]), }, null, 8, ["modelValue"]),
@ -772,7 +797,7 @@ const _sfc_main$1 = defineComponent({
createElementVNode("div", { createElementVNode("div", {
class: "multiOption", class: "multiOption",
"data-type": "all", "data-type": "all",
onClick: _cache[2] || (_cache[2] = ($event) => select(1)) onClick: _cache[1] || (_cache[1] = ($event) => select(1))
}, [ }, [
_hoisted_7$1, _hoisted_7$1,
createTextVNode(" \u5168\u9009 ") createTextVNode(" \u5168\u9009 ")
@ -780,7 +805,7 @@ const _sfc_main$1 = defineComponent({
createElementVNode("div", { createElementVNode("div", {
class: "multiOption", class: "multiOption",
"data-type": "none", "data-type": "none",
onClick: _cache[3] || (_cache[3] = ($event) => select(2)) onClick: _cache[2] || (_cache[2] = ($event) => select(2))
}, [ }, [
_hoisted_8$1, _hoisted_8$1,
createTextVNode(" \u6E05\u7A7A ") createTextVNode(" \u6E05\u7A7A ")
@ -788,16 +813,16 @@ const _sfc_main$1 = defineComponent({
createElementVNode("div", { createElementVNode("div", {
class: "multiOption", class: "multiOption",
"data-type": "reverse", "data-type": "reverse",
onClick: _cache[4] || (_cache[4] = ($event) => select(3)) onClick: _cache[3] || (_cache[3] = ($event) => select(3))
}, [ }, [
_hoisted_9$1, _hoisted_9$1,
createTextVNode("\u53CD\u9009 ") createTextVNode("\u53CD\u9009 ")
]) ])
]), ]),
createElementVNode("ul", null, [ createElementVNode("ul", _hoisted_10$1, [
createVNode(_sfc_main$9, { createVNode(_sfc_main$9, {
modelValue: sel.value, modelValue: sel.value,
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => sel.value = $event) "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => sel.value = $event)
}, { }, {
default: withCtx(() => [ default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (i, j) => { (openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (i, j) => {
@ -925,7 +950,8 @@ const _sfc_main = defineComponent({
getCheckboxProps: { type: Function, default: () => { getCheckboxProps: { type: Function, default: () => {
} }, } },
getRadioProps: { type: Function, default: () => { getRadioProps: { type: Function, default: () => {
} } } },
download: { default: "" }
}, },
emits: [ emits: [
"change", "change",
@ -1129,7 +1155,7 @@ const _sfc_main = defineComponent({
} }
tableStr += "</tr>"; tableStr += "</tr>";
} }
tableDataSource.value.forEach((item, rowIndex) => { datalist.value.forEach((item, rowIndex) => {
tableStr += "<tr>"; tableStr += "<tr>";
tableBodyColumns.value.forEach((tableColumn, columnIndex) => { tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
Object.keys(item).forEach((name) => { Object.keys(item).forEach((name) => {
@ -1158,7 +1184,10 @@ const _sfc_main = defineComponent({
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table> <table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
</body> </body>
</html>`; </html>`;
window.location.href = uri + base64(exportTemplate); let a = document.createElement("a");
a.href = uri + base64(exportTemplate);
a.download = (props.download || "\u4E0B\u8F7D\u6587\u4EF6") + ".xls";
a.click();
return; return;
}; };
function base64(s2) { function base64(s2) {
@ -1760,12 +1789,14 @@ const _sfc_main = defineComponent({
withDirectives(createVNode(_sfc_main$1, { withDirectives(createVNode(_sfc_main$1, {
top: soultop.value, top: soultop.value,
left: soulleft.value, left: soulleft.value,
show: soulkey.value == column.key,
onAsc: asc, onAsc: asc,
onDesc: desc, onDesc: desc,
list: props.dataSource, onDaochu: exportData,
list: datalist.value,
soulkey: column.key, soulkey: column.key,
onSx: sx onSx: sx
}, null, 8, ["top", "left", "list", "soulkey"]), [ }, null, 8, ["top", "left", "show", "list", "soulkey"]), [
[vShow, soulkey.value == column.key] [vShow, soulkey.value == column.key]
]) ])
]); ]);

View File

@ -23,7 +23,8 @@ const _sfc_main$1 = defineComponent({
selectedKey: null, selectedKey: null,
checkStrictly: { type: [Boolean, String] }, checkStrictly: { type: [Boolean, String] },
collapseTransition: { type: Boolean }, collapseTransition: { type: Boolean },
onlyIconControl: { type: Boolean } onlyIconControl: { type: Boolean },
hideicon: { type: Boolean }
}, },
emits: ["node-click"], emits: ["node-click"],
setup(__props, { emit }) { setup(__props, { emit }) {
@ -42,6 +43,9 @@ const _sfc_main$1 = defineComponent({
if (node.children.length !== 0) { if (node.children.length !== 0) {
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction"; return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
} }
if (props.hideicon) {
return "";
}
return "layui-icon-file"; return "layui-icon-file";
}; };
function recursiveNodeClick(node) { function recursiveNodeClick(node) {
@ -161,6 +165,7 @@ const _sfc_main$1 = defineComponent({
"collapse-transition": __props.collapseTransition, "collapse-transition": __props.collapseTransition,
checkStrictly: __props.checkStrictly, checkStrictly: __props.checkStrictly,
"only-icon-control": __props.onlyIconControl, "only-icon-control": __props.onlyIconControl,
hideicon: props.hideicon,
onNodeClick: recursiveNodeClick onNodeClick: recursiveNodeClick
}, createSlots({ _: 2 }, [ }, createSlots({ _: 2 }, [
_ctx.$slots.title ? { _ctx.$slots.title ? {
@ -172,7 +177,7 @@ const _sfc_main$1 = defineComponent({
]), ]),
key: "0" key: "0"
} : void 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) ])) : createCommentVNode("", true)
]), ]),
_: 2 _: 2
@ -377,7 +382,8 @@ const _sfc_main = defineComponent({
children: "children", children: "children",
title: "title" title: "title"
}; };
} } } },
hideicon: { type: Boolean }
}, },
emits: ["update:checkedKeys", "update:expandKeys", "node-click"], emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
setup(__props, { emit }) { setup(__props, { emit }) {
@ -439,7 +445,8 @@ const _sfc_main = defineComponent({
"check-strictly": __props.checkStrictly, "check-strictly": __props.checkStrictly,
"collapse-transition": __props.collapseTransition, "collapse-transition": __props.collapseTransition,
"only-icon-control": __props.onlyIconControl, "only-icon-control": __props.onlyIconControl,
onNodeClick: handleClick onNodeClick: handleClick,
hideicon: props.hideicon
}, createSlots({ _: 2 }, [ }, createSlots({ _: 2 }, [
_ctx.$slots.title ? { _ctx.$slots.title ? {
name: "title", name: "title",
@ -448,7 +455,7 @@ const _sfc_main = defineComponent({
]), ]),
key: "0" key: "0"
} : void 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); ], 2);
}; };
} }

File diff suppressed because one or more lines are too long

View File

@ -798,7 +798,7 @@ var _hoisted_8$e = {
var _hoisted_9$b = { var _hoisted_9$b = {
key: 0 key: 0
}; };
var _hoisted_10$a = { var _hoisted_10$b = {
key: 1 key: 1
}; };
var __default__$2$2 = { var __default__$2$2 = {
@ -881,7 +881,7 @@ var _sfc_main$2$1 = defineComponent(_objectSpread$3(_objectSpread$3({}, __defaul
style: normalizeStyle({ style: normalizeStyle({
left: "calc(calc( calc(100% - ".concat(100 * __props.imgList.length, "px) / 2) + ").concat(index2.value * 100, "px)") left: "calc(calc( calc(100% - ".concat(100 * __props.imgList.length, "px) / 2) + ").concat(index2.value * 100, "px)")
}) })
}, null, 4)])) : (openBlock(), createElementBlock("span", _hoisted_8$e, [__props.imgList[index2.value].alt ? (openBlock(), createElementBlock("span", _hoisted_9$b, toDisplayString$1(__props.imgList[index2.value].alt), 1)) : createCommentVNode("", true), __props.imgList.length > 1 ? (openBlock(), createElementBlock("em", _hoisted_10$a, toDisplayString$1(index2.value + 1) + " / " + toDisplayString$1(__props.imgList.length), 1)) : createCommentVNode("", true)]))], 4)) : createCommentVNode("", true)])) : createCommentVNode("", true)]); }, null, 4)])) : (openBlock(), createElementBlock("span", _hoisted_8$e, [__props.imgList[index2.value].alt ? (openBlock(), createElementBlock("span", _hoisted_9$b, toDisplayString$1(__props.imgList[index2.value].alt), 1)) : createCommentVNode("", true), __props.imgList.length > 1 ? (openBlock(), createElementBlock("em", _hoisted_10$b, toDisplayString$1(index2.value + 1) + " / " + toDisplayString$1(__props.imgList.length), 1)) : createCommentVNode("", true)]))], 4)) : createCommentVNode("", true)])) : createCommentVNode("", true)]);
}; };
} }
})); }));
@ -11579,7 +11579,7 @@ const _hoisted_6$j = /* @__PURE__ */ createElementVNode("i", { class: "layui-ico
const _hoisted_7$g = { class: "layui-iconpicker-list" }; const _hoisted_7$g = { class: "layui-iconpicker-list" };
const _hoisted_8$c = ["onClick"]; const _hoisted_8$c = ["onClick"];
const _hoisted_9$a = { class: "layui-elip" }; const _hoisted_9$a = { class: "layui-elip" };
const _hoisted_10$9 = { const _hoisted_10$a = {
key: 1, key: 1,
class: "layui-iconpicker-page" class: "layui-iconpicker-page"
}; };
@ -11779,7 +11779,7 @@ const _sfc_main$1u = defineComponent({
_: 1 _: 1
}) })
]), ]),
__props.page ? (openBlock(), createElementBlock("div", _hoisted_10$9, [ __props.page ? (openBlock(), createElementBlock("div", _hoisted_10$a, [
createElementVNode("div", _hoisted_11$9, [ createElementVNode("div", _hoisted_11$9, [
createElementVNode("span", _hoisted_12$7, "\u5171 " + toDisplayString$1(total.value) + " \u4E2A", 1), createElementVNode("span", _hoisted_12$7, "\u5171 " + toDisplayString$1(total.value) + " \u4E2A", 1),
createElementVNode("a", { createElementVNode("a", {
@ -17620,7 +17620,8 @@ const _sfc_main$K = defineComponent({
selectedKey: null, selectedKey: null,
checkStrictly: { type: [Boolean, String] }, checkStrictly: { type: [Boolean, String] },
collapseTransition: { type: Boolean }, collapseTransition: { type: Boolean },
onlyIconControl: { type: Boolean } onlyIconControl: { type: Boolean },
hideicon: { type: Boolean }
}, },
emits: ["node-click"], emits: ["node-click"],
setup(__props, { emit }) { setup(__props, { emit }) {
@ -17639,6 +17640,9 @@ const _sfc_main$K = defineComponent({
if (node.children.length !== 0) { if (node.children.length !== 0) {
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction"; return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
} }
if (props.hideicon) {
return "";
}
return "layui-icon-file"; return "layui-icon-file";
}; };
function recursiveNodeClick(node) { function recursiveNodeClick(node) {
@ -17758,6 +17762,7 @@ const _sfc_main$K = defineComponent({
"collapse-transition": __props.collapseTransition, "collapse-transition": __props.collapseTransition,
checkStrictly: __props.checkStrictly, checkStrictly: __props.checkStrictly,
"only-icon-control": __props.onlyIconControl, "only-icon-control": __props.onlyIconControl,
hideicon: props.hideicon,
onNodeClick: recursiveNodeClick onNodeClick: recursiveNodeClick
}, createSlots({ _: 2 }, [ }, createSlots({ _: 2 }, [
_ctx.$slots.title ? { _ctx.$slots.title ? {
@ -17769,7 +17774,7 @@ const _sfc_main$K = defineComponent({
]), ]),
key: "0" key: "0"
} : void 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) ])) : createCommentVNode("", true)
]), ]),
_: 2 _: 2
@ -17974,7 +17979,8 @@ const _sfc_main$J = defineComponent({
children: "children", children: "children",
title: "title" title: "title"
}; };
} } } },
hideicon: { type: Boolean }
}, },
emits: ["update:checkedKeys", "update:expandKeys", "node-click"], emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
setup(__props, { emit }) { setup(__props, { emit }) {
@ -18036,7 +18042,8 @@ const _sfc_main$J = defineComponent({
"check-strictly": __props.checkStrictly, "check-strictly": __props.checkStrictly,
"collapse-transition": __props.collapseTransition, "collapse-transition": __props.collapseTransition,
"only-icon-control": __props.onlyIconControl, "only-icon-control": __props.onlyIconControl,
onNodeClick: handleClick onNodeClick: handleClick,
hideicon: props.hideicon
}, createSlots({ _: 2 }, [ }, createSlots({ _: 2 }, [
_ctx.$slots.title ? { _ctx.$slots.title ? {
name: "title", name: "title",
@ -18045,7 +18052,7 @@ const _sfc_main$J = defineComponent({
]), ]),
key: "0" key: "0"
} : void 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); ], 2);
}; };
} }
@ -18249,7 +18256,7 @@ const _hoisted_8$b = {
class: "layui-table-cell-expand-icon-spaced" class: "layui-table-cell-expand-icon-spaced"
}; };
const _hoisted_9$9 = ["colspan", "rowspan", "onClick"]; const _hoisted_9$9 = ["colspan", "rowspan", "onClick"];
const _hoisted_10$8 = { const _hoisted_10$9 = {
key: 1, key: 1,
class: "layui-table-cell-expand-icon-spaced" class: "layui-table-cell-expand-icon-spaced"
}; };
@ -18674,7 +18681,7 @@ const _sfc_main$H = defineComponent({
key: 0, key: 0,
style: normalizeStyle({ "margin-right": __props.currentIndentSize + "px" }) style: normalizeStyle({ "margin-right": __props.currentIndentSize + "px" })
}, null, 4)) : createCommentVNode("", true), }, null, 4)) : createCommentVNode("", true),
__props.expandSpace && !__props.data[__props.childrenColumnName] && !unref(slot).expand && columnIndex === __props.expandIndex ? (openBlock(), createElementBlock("span", _hoisted_10$8)) : createCommentVNode("", true), __props.expandSpace && !__props.data[__props.childrenColumnName] && !unref(slot).expand && columnIndex === __props.expandIndex ? (openBlock(), createElementBlock("span", _hoisted_10$9)) : createCommentVNode("", true),
(unref(slot).expand || __props.data[__props.childrenColumnName]) && columnIndex === __props.expandIndex ? (openBlock(), createBlock(unref(_sfc_main$2E), { (unref(slot).expand || __props.data[__props.childrenColumnName]) && columnIndex === __props.expandIndex ? (openBlock(), createBlock(unref(_sfc_main$2E), {
key: 2, key: 2,
class: "layui-table-cell-expand-icon", class: "layui-table-cell-expand-icon",
@ -18801,7 +18808,7 @@ const _hoisted_9$8 = {
key: 4, key: 4,
class: "layui-laypage-skip" class: "layui-laypage-skip"
}; };
const _hoisted_10$7 = ["disabled"]; const _hoisted_10$8 = ["disabled"];
const _hoisted_11$7 = { key: 5 }; const _hoisted_11$7 = { key: 5 };
const __default__$D = { const __default__$D = {
name: "LayPage" name: "LayPage"
@ -18977,7 +18984,7 @@ const _sfc_main$G = defineComponent({
class: "layui-laypage-btn", class: "layui-laypage-btn",
onClick: _cache[5] || (_cache[5] = ($event) => jumpPage()), onClick: _cache[5] || (_cache[5] = ($event) => jumpPage()),
disabled: currentPageShow.value > maxPage.value || currentPageShow.value == currentPage.value disabled: currentPageShow.value > maxPage.value || currentPageShow.value == currentPage.value
}, toDisplayString$1(unref(t)("page.confirm")), 9, _hoisted_10$7) }, toDisplayString$1(unref(t)("page.confirm")), 9, _hoisted_10$8)
])) : createCommentVNode("", true), ])) : createCommentVNode("", true),
__props.count ? (openBlock(), createElementBlock("span", _hoisted_11$7, "\u5171" + toDisplayString$1(__props.count) + "\u6761", 1)) : createCommentVNode("", true) __props.count ? (openBlock(), createElementBlock("span", _hoisted_11$7, "\u5171" + toDisplayString$1(__props.count) + "\u6761", 1)) : createCommentVNode("", true)
]); ]);
@ -19054,34 +19061,48 @@ const _sfc_main$F = defineComponent({
}; };
} }
}); });
var soultable = /* @__PURE__ */ (() => ".soulbox{background-color:#333;color:#fff;display:inline-block;position:absolute;z-index:2147483647;min-width:160px;max-width:300px;overflow-y:auto;border:1px solid #e6e6e6;border-radius:5px;box-shadow:2px 2px 4px -2px #0003}\n")(); var soultable = /* @__PURE__ */ (() => ".soulbox{background-color:#333;color:#fff;display:inline-block;position:absolute;z-index:2147483647;min-width:160px;max-width:320px;overflow-y:auto;border:1px solid #e6e6e6;border-radius:5px;box-shadow:2px 2px 4px -2px #0003}\n")();
const _hoisted_1$v = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-asc" }, null, -1); const _hoisted_1$v = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-asc" }, null, -1);
const _hoisted_2$s = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-desc" }, null, -1); const _hoisted_2$s = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-desc" }, null, -1);
const _hoisted_3$p = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-drop-list" }, null, -1); const _hoisted_3$p = /* @__PURE__ */ createElementVNode("li", {
const _hoisted_4$k = /* @__PURE__ */ createElementVNode("i", { class: "soul-dropList",
class: "layui-icon layui-icon-right", style: {},
style: { "float": "right" } show: "select"
}, null, -1); }, [
/* @__PURE__ */ createElementVNode("i", {
class: "soul-icon soul-icon-drop-list",
show: "select"
}),
/* @__PURE__ */ createTextVNode(" \u7B5B\u9009\u6570\u636E "),
/* @__PURE__ */ createElementVNode("i", {
class: "layui-icon layui-icon-right",
style: { "float": "right" },
show: "select"
})
], -1);
const _hoisted_4$k = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-download" }, null, -1);
const _hoisted_5$g = { const _hoisted_5$g = {
class: "soulbox", class: "soulbox",
style: { "left": "100%", "top": "65px" } style: { "left": "100%", "top": "65px" }
}; };
const _hoisted_6$d = { const _hoisted_6$d = {
class: "check", class: "check",
style: { "min-width": "180px" } style: { "min-width": "190px" }
}; };
const _hoisted_7$c = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE623", -1); const _hoisted_7$c = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE623", -1);
const _hoisted_8$9 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE63E", -1); const _hoisted_8$9 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE63E", -1);
const _hoisted_9$7 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE614", -1); const _hoisted_9$7 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE614", -1);
const _hoisted_10$7 = { style: { "max-height": "300px", "overflow": "auto" } };
const _sfc_main$E = defineComponent({ const _sfc_main$E = defineComponent({
__name: "soultable", __name: "soultable",
props: { props: {
left: { default: 10 }, left: { default: 10 },
top: { default: 10 }, top: { default: 10 },
list: { default: [] }, list: { default: [] },
soulkey: { default: "" } soulkey: { default: "" },
show: { type: Boolean, default: false }
}, },
emits: ["asc", "desc", "sx"], emits: ["asc", "desc", "sx", "daochu"],
setup(__props, { emit }) { setup(__props, { emit }) {
const props = __props; const props = __props;
function asc(event) { function asc(event) {
@ -19090,18 +19111,20 @@ const _sfc_main$E = defineComponent({
function desc(event) { function desc(event) {
emit("desc", event); emit("desc", event);
} }
function daochu() {
emit("daochu");
}
const sel = ref([]); const sel = ref([]);
const list = ref([]); const list = ref([]);
const alllist = ref([]); const alllist = ref([]);
watch(() => [props.list, props.soulkey], () => { watch(() => [props.show], () => {
let set = /* @__PURE__ */ new Set(); let set = /* @__PURE__ */ new Set();
for (let i of props.list) { for (let i of props.list) {
set.add(i[props.soulkey]); set.add(i[props.soulkey]);
console.log(i, i[props.soulkey]);
} }
alllist.value = Array.from(set); alllist.value = Array.from(set);
list.value = alllist.value; list.value = alllist.value;
console.log(list.value); selshow.value = false;
}, { deep: true }); }, { deep: true });
const seltext = ref(""); const seltext = ref("");
watch(seltext, () => { watch(seltext, () => {
@ -19141,14 +19164,22 @@ const _sfc_main$E = defineComponent({
} }
} }
const selshow = ref(false); const selshow = ref(false);
function shubiao(event) {
console.log(event, 160);
if (event.target.getAttribute("show") == "select") {
selshow.value = true;
} else {
selshow.value = false;
}
}
return (_ctx, _cache) => { return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", { return openBlock(), createElementBlock("div", {
class: "soulbox", class: "soulbox",
style: normalizeStyle(`top: ${props.top}px;left:${props.left}px`), style: normalizeStyle(`top: ${props.top}px;left:${props.left}px`),
onClick: _cache[6] || (_cache[6] = withModifiers(() => { onClick: _cache[5] || (_cache[5] = withModifiers(() => {
}, ["stop"])) }, ["stop"]))
}, [ }, [
createElementVNode("ul", null, [ createElementVNode("ul", { onMouseover: shubiao }, [
createElementVNode("li", { createElementVNode("li", {
onClick: asc, onClick: asc,
class: "soul-sort", class: "soul-sort",
@ -19167,21 +19198,22 @@ const _sfc_main$E = defineComponent({
_hoisted_2$s, _hoisted_2$s,
createTextVNode(" \u964D\u5E8F\u6392\u5217 ") createTextVNode(" \u964D\u5E8F\u6392\u5217 ")
]), ]),
_hoisted_3$p,
createElementVNode("li", { createElementVNode("li", {
class: "soul-dropList", onClick: daochu,
style: {}, class: "soul-sort",
onMouseover: _cache[0] || (_cache[0] = ($event) => selshow.value = true) "data-value": "desc",
style: { "border-bottom": "1px solid rgb(230, 230, 230)" }
}, [ }, [
_hoisted_3$p, _hoisted_4$k,
createTextVNode(" \u7B5B\u9009\u6570\u636E "), createTextVNode(" \u5BFC\u51FAexcel ")
_hoisted_4$k ])
], 32) ], 32),
]),
withDirectives(createElementVNode("div", _hoisted_5$g, [ withDirectives(createElementVNode("div", _hoisted_5$g, [
createVNode(_sfc_main$1w, { createVNode(_sfc_main$1w, {
"prefix-icon": "layui-icon-search", "prefix-icon": "layui-icon-search",
modelValue: seltext.value, modelValue: seltext.value,
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => seltext.value = $event), "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seltext.value = $event),
size: "sm", size: "sm",
placeholder: "\u5173\u952E\u5B57\u641C\u7D22" placeholder: "\u5173\u952E\u5B57\u641C\u7D22"
}, null, 8, ["modelValue"]), }, null, 8, ["modelValue"]),
@ -19189,7 +19221,7 @@ const _sfc_main$E = defineComponent({
createElementVNode("div", { createElementVNode("div", {
class: "multiOption", class: "multiOption",
"data-type": "all", "data-type": "all",
onClick: _cache[2] || (_cache[2] = ($event) => select(1)) onClick: _cache[1] || (_cache[1] = ($event) => select(1))
}, [ }, [
_hoisted_7$c, _hoisted_7$c,
createTextVNode(" \u5168\u9009 ") createTextVNode(" \u5168\u9009 ")
@ -19197,7 +19229,7 @@ const _sfc_main$E = defineComponent({
createElementVNode("div", { createElementVNode("div", {
class: "multiOption", class: "multiOption",
"data-type": "none", "data-type": "none",
onClick: _cache[3] || (_cache[3] = ($event) => select(2)) onClick: _cache[2] || (_cache[2] = ($event) => select(2))
}, [ }, [
_hoisted_8$9, _hoisted_8$9,
createTextVNode(" \u6E05\u7A7A ") createTextVNode(" \u6E05\u7A7A ")
@ -19205,16 +19237,16 @@ const _sfc_main$E = defineComponent({
createElementVNode("div", { createElementVNode("div", {
class: "multiOption", class: "multiOption",
"data-type": "reverse", "data-type": "reverse",
onClick: _cache[4] || (_cache[4] = ($event) => select(3)) onClick: _cache[3] || (_cache[3] = ($event) => select(3))
}, [ }, [
_hoisted_9$7, _hoisted_9$7,
createTextVNode("\u53CD\u9009 ") createTextVNode("\u53CD\u9009 ")
]) ])
]), ]),
createElementVNode("ul", null, [ createElementVNode("ul", _hoisted_10$7, [
createVNode(_sfc_main$$, { createVNode(_sfc_main$$, {
modelValue: sel.value, modelValue: sel.value,
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => sel.value = $event) "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => sel.value = $event)
}, { }, {
default: withCtx(() => [ default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (i, j) => { (openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (i, j) => {
@ -19342,7 +19374,8 @@ const _sfc_main$D = defineComponent({
getCheckboxProps: { type: Function, default: () => { getCheckboxProps: { type: Function, default: () => {
} }, } },
getRadioProps: { type: Function, default: () => { getRadioProps: { type: Function, default: () => {
} } } },
download: { default: "" }
}, },
emits: [ emits: [
"change", "change",
@ -19546,7 +19579,7 @@ const _sfc_main$D = defineComponent({
} }
tableStr += "</tr>"; tableStr += "</tr>";
} }
tableDataSource.value.forEach((item, rowIndex) => { datalist.value.forEach((item, rowIndex) => {
tableStr += "<tr>"; tableStr += "<tr>";
tableBodyColumns.value.forEach((tableColumn, columnIndex) => { tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
Object.keys(item).forEach((name) => { Object.keys(item).forEach((name) => {
@ -19575,7 +19608,10 @@ const _sfc_main$D = defineComponent({
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table> <table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
</body> </body>
</html>`; </html>`;
window.location.href = uri + base64(exportTemplate); let a = document.createElement("a");
a.href = uri + base64(exportTemplate);
a.download = (props.download || "\u4E0B\u8F7D\u6587\u4EF6") + ".xls";
a.click();
return; return;
}; };
function base64(s2) { function base64(s2) {
@ -20177,12 +20213,14 @@ const _sfc_main$D = defineComponent({
withDirectives(createVNode(_sfc_main$E, { withDirectives(createVNode(_sfc_main$E, {
top: soultop.value, top: soultop.value,
left: soulleft.value, left: soulleft.value,
show: soulkey.value == column.key,
onAsc: asc, onAsc: asc,
onDesc: desc, onDesc: desc,
list: props.dataSource, onDaochu: exportData,
list: datalist.value,
soulkey: column.key, soulkey: column.key,
onSx: sx onSx: sx
}, null, 8, ["top", "left", "list", "soulkey"]), [ }, null, 8, ["top", "left", "show", "list", "soulkey"]), [
[vShow, soulkey.value == column.key] [vShow, soulkey.value == column.key]
]) ])
]); ]);

View File

@ -52,6 +52,7 @@ export interface TableProps {
loading?: boolean; loading?: boolean;
getCheckboxProps?: Function; getCheckboxProps?: Function;
getRadioProps?: Function; getRadioProps?: Function;
download?:string;
} }
const props = withDefaults(defineProps<TableProps>(), { const props = withDefaults(defineProps<TableProps>(), {
@ -76,6 +77,7 @@ const props = withDefaults(defineProps<TableProps>(), {
loading: false, loading: false,
getCheckboxProps: () => {}, getCheckboxProps: () => {},
getRadioProps: () => {}, getRadioProps: () => {},
download:""
}); });
const emit = defineEmits([ const emit = defineEmits([
@ -387,7 +389,7 @@ const exportData = () => {
} }
tableStr += "</tr>"; tableStr += "</tr>";
} }
tableDataSource.value.forEach((item, rowIndex) => { datalist.value.forEach((item, rowIndex) => {
tableStr += "<tr>"; tableStr += "<tr>";
tableBodyColumns.value.forEach((tableColumn, columnIndex) => { tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
Object.keys(item).forEach((name) => { Object.keys(item).forEach((name) => {
@ -421,7 +423,11 @@ const exportData = () => {
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table> <table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
</body> </body>
</html>`; </html>`;
window.location.href = uri + base64(exportTemplate); let a = document.createElement("a")
a.href = uri + base64(exportTemplate);
a.download= (props.download || "下载文件") + ".xls";
a.click();
// window.location.href =
return; return;
}; };
@ -1133,9 +1139,11 @@ window.addEventListener("click", heddin);
:top="soultop" :top="soultop"
:left="soulleft" :left="soulleft"
v-show="soulkey == column.key" v-show="soulkey == column.key"
:show="soulkey == column.key"
@asc="asc" @asc="asc"
@desc="desc" @desc="desc"
:list="props.dataSource" @daochu="exportData"
:list="datalist"
:soulkey="column.key" :soulkey="column.key"
@sx="sx" @sx="sx"
></soultable> ></soultable>

View File

@ -6,7 +6,7 @@
position: absolute; position: absolute;
z-index: 2147483647; z-index: 2147483647;
min-width: 160px; min-width: 160px;
max-width: 300px; max-width: 320px;
overflow-y: auto; overflow-y: auto;
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
border-radius: 5px; border-radius: 5px;

View File

@ -4,7 +4,7 @@
:style="`top: ${props.top}px;left:${props.left}px`" :style="`top: ${props.top}px;left:${props.left}px`"
@click.stop="" @click.stop=""
> >
<ul> <ul @mouseover="shubiao">
<li @click="asc" class="soul-sort" data-value="asc" style=""> <li @click="asc" class="soul-sort" data-value="asc" style="">
<i class="soul-icon soul-icon-asc"></i> 升序排列 <i class="soul-icon soul-icon-asc"></i> 升序排列
</li> </li>
@ -18,9 +18,17 @@
</li> </li>
<!-- <li class="soul-column" style=""><i class="layui-icon layui-icon-table"></i> 表格列 <i <!-- <li class="soul-column" style=""><i class="layui-icon layui-icon-table"></i> 表格列 <i
class="layui-icon layui-icon-right" style="float: right"></i></li> --> class="layui-icon layui-icon-right" style="float: right"></i></li> -->
<li class="soul-dropList" style="" @mouseover="selshow = true"> <li class="soul-dropList" style="" show="select">
<i class="soul-icon soul-icon-drop-list"></i> 筛选数据 <i class="soul-icon soul-icon-drop-list" show="select"></i> 筛选数据
<i class="layui-icon layui-icon-right" style="float: right"></i> <i class="layui-icon layui-icon-right" style="float: right" show="select"></i>
</li>
<li
@click="daochu"
class="soul-sort"
data-value="desc"
style="border-bottom: 1px solid rgb(230, 230, 230)"
>
<i class="soul-icon soul-icon-download"></i> 导出excel
</li> </li>
<!-- <li class="soul-condition" style=""><i class="soul-icon soul-icon-query"></i> 筛选条件 <i <!-- <li class="soul-condition" style=""><i class="soul-icon soul-icon-query"></i> 筛选条件 <i
class="layui-icon layui-icon-right" style="float: right"></i></li> class="layui-icon layui-icon-right" style="float: right"></i></li>
@ -35,7 +43,7 @@
placeholder="关键字搜索" placeholder="关键字搜索"
> >
</lay-input> </lay-input>
<div class="check" style="min-width: 180px"> <div class="check" style="min-width: 190px">
<div class="multiOption" data-type="all" @click="select(1)"> <div class="multiOption" data-type="all" @click="select(1)">
<i class="soul-icon"></i> 全选 <i class="soul-icon"></i> 全选
</div> </div>
@ -46,7 +54,7 @@
<i class="soul-icon"></i>反选 <i class="soul-icon"></i>反选
</div> </div>
</div> </div>
<ul> <ul style="max-height: 300px;overflow: auto;">
<LayCheckboxGroup v-model="sel"> <LayCheckboxGroup v-model="sel">
<li v-for="(i, j) in list"> <li v-for="(i, j) in list">
<LayCheckbox skin="primary" :value="i"></LayCheckbox>{{ i }} <LayCheckbox skin="primary" :value="i"></LayCheckbox>{{ i }}
@ -68,34 +76,40 @@ export interface SoulTableProps {
top: number; top: number;
list: any; list: any;
soulkey: string; soulkey: string;
show:boolean;
} }
const props = withDefaults(defineProps<SoulTableProps>(), { const props = withDefaults(defineProps<SoulTableProps>(), {
top: 10, top: 10,
left: 10, left: 10,
list: [], list: [],
soulkey: "", soulkey: "",
show:false
}); });
const emit = defineEmits(["asc", "desc", "sx"]); const emit = defineEmits(["asc", "desc", "sx",'daochu']);
function asc(event: any) { function asc(event: any) {
emit("asc", event); emit("asc", event);
} }
function desc(event: any) { function desc(event: any) {
emit("desc", event); emit("desc", event);
} }
function daochu(){
emit("daochu")
}
const sel: any = ref([]); const sel: any = ref([]);
const list: any = ref([]); const list: any = ref([]);
const alllist: any = ref([]); const alllist: any = ref([]);
watch( watch(
() => [props.list, props.soulkey], () => [props.show],
() => { () => {
let set = new Set(); let set = new Set();
for (let i of props.list) { for (let i of props.list) {
set.add(i[props.soulkey]); set.add(i[props.soulkey]);
console.log(i, i[props.soulkey]); // console.log(i, i[props.soulkey]);
} }
alllist.value = Array.from(set); alllist.value = Array.from(set);
list.value = alllist.value; list.value = alllist.value;
console.log(list.value); selshow.value = false
// console.log(list.value);
}, },
{ deep: true } { deep: true }
); );
@ -143,4 +157,14 @@ function select(type: number) {
} }
} }
const selshow = ref(false); const selshow = ref(false);
function shubiao(event:any){
console.log(event,160)
if(event.target.getAttribute("show") == "select"){
selshow.value = true
}else{
selshow.value = false
}
}
</script> </script>

View File

@ -35,6 +35,7 @@ export interface TreeNodeProps {
checkStrictly: boolean | string; checkStrictly: boolean | string;
collapseTransition: boolean; collapseTransition: boolean;
onlyIconControl: boolean; onlyIconControl: boolean;
hideicon?: boolean;
} }
interface TreeNodeEmits { interface TreeNodeEmits {
@ -69,6 +70,9 @@ const nodeIconType = (node: TreeData): string => {
if (node.children.length !== 0) { if (node.children.length !== 0) {
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction"; return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
} }
if(props.hideicon){
return ""
}
return "layui-icon-file"; return "layui-icon-file";
}; };
@ -193,6 +197,7 @@ const isChildAllSelected = computed(() => {
:collapse-transition="collapseTransition" :collapse-transition="collapseTransition"
:checkStrictly="checkStrictly" :checkStrictly="checkStrictly"
:only-icon-control="onlyIconControl" :only-icon-control="onlyIconControl"
:hideicon="props.hideicon"
@node-click="recursiveNodeClick" @node-click="recursiveNodeClick"
> >
<template v-if="$slots.title" v-slot:title="slotProp: { data: any }"> <template v-if="$slots.title" v-slot:title="slotProp: { data: any }">

View File

@ -38,6 +38,7 @@ export interface TreeProps {
showLine?: boolean; showLine?: boolean;
showCheckbox?: boolean; showCheckbox?: boolean;
replaceFields?: ReplaceFieldsOptions; replaceFields?: ReplaceFieldsOptions;
hideicon?:boolean;
} }
interface TreeEmits { interface TreeEmits {
@ -144,6 +145,7 @@ function handleClick(node: TreeData) {
:collapse-transition="collapseTransition" :collapse-transition="collapseTransition"
:only-icon-control="onlyIconControl" :only-icon-control="onlyIconControl"
@node-click="handleClick" @node-click="handleClick"
:hideicon="props.hideicon"
> >
<template v-if="$slots.title" v-slot:title="{ data }"> <template v-if="$slots.title" v-slot:title="{ data }">
<slot name="title" :data="data"></slot> <slot name="title" :data="data"></slot>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long