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

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 = {
key: 0
};
var _hoisted_10$a = {
var _hoisted_10$b = {
key: 1
};
var __default__$2$2 = {
@@ -881,7 +881,7 @@ var _sfc_main$2$1 = defineComponent(_objectSpread$3(_objectSpread$3({}, __defaul
style: normalizeStyle({
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_8$c = ["onClick"];
const _hoisted_9$a = { class: "layui-elip" };
const _hoisted_10$9 = {
const _hoisted_10$a = {
key: 1,
class: "layui-iconpicker-page"
};
@@ -11779,7 +11779,7 @@ const _sfc_main$1u = defineComponent({
_: 1
})
]),
__props.page ? (openBlock(), createElementBlock("div", _hoisted_10$9, [
__props.page ? (openBlock(), createElementBlock("div", _hoisted_10$a, [
createElementVNode("div", _hoisted_11$9, [
createElementVNode("span", _hoisted_12$7, "\u5171 " + toDisplayString$1(total.value) + " \u4E2A", 1),
createElementVNode("a", {
@@ -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);
};
}
@@ -18249,7 +18256,7 @@ const _hoisted_8$b = {
class: "layui-table-cell-expand-icon-spaced"
};
const _hoisted_9$9 = ["colspan", "rowspan", "onClick"];
const _hoisted_10$8 = {
const _hoisted_10$9 = {
key: 1,
class: "layui-table-cell-expand-icon-spaced"
};
@@ -18674,7 +18681,7 @@ const _sfc_main$H = defineComponent({
key: 0,
style: normalizeStyle({ "margin-right": __props.currentIndentSize + "px" })
}, 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), {
key: 2,
class: "layui-table-cell-expand-icon",
@@ -18801,7 +18808,7 @@ const _hoisted_9$8 = {
key: 4,
class: "layui-laypage-skip"
};
const _hoisted_10$7 = ["disabled"];
const _hoisted_10$8 = ["disabled"];
const _hoisted_11$7 = { key: 5 };
const __default__$D = {
name: "LayPage"
@@ -18977,7 +18984,7 @@ const _sfc_main$G = defineComponent({
class: "layui-laypage-btn",
onClick: _cache[5] || (_cache[5] = ($event) => jumpPage()),
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),
__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_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_4$k = /* @__PURE__ */ createElementVNode("i", {
class: "layui-icon layui-icon-right",
style: { "float": "right" }
}, null, -1);
const _hoisted_3$p = /* @__PURE__ */ createElementVNode("li", {
class: "soul-dropList",
style: {},
show: "select"
}, [
/* @__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 = {
class: "soulbox",
style: { "left": "100%", "top": "65px" }
};
const _hoisted_6$d = {
class: "check",
style: { "min-width": "180px" }
style: { "min-width": "190px" }
};
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_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({
__name: "soultable",
props: {
left: { default: 10 },
top: { default: 10 },
list: { default: [] },
soulkey: { default: "" }
soulkey: { default: "" },
show: { type: Boolean, default: false }
},
emits: ["asc", "desc", "sx"],
emits: ["asc", "desc", "sx", "daochu"],
setup(__props, { emit }) {
const props = __props;
function asc(event) {
@@ -19090,18 +19111,20 @@ const _sfc_main$E = defineComponent({
function desc(event) {
emit("desc", event);
}
function daochu() {
emit("daochu");
}
const sel = ref([]);
const list = ref([]);
const alllist = ref([]);
watch(() => [props.list, props.soulkey], () => {
watch(() => [props.show], () => {
let set = /* @__PURE__ */ new Set();
for (let i of props.list) {
set.add(i[props.soulkey]);
console.log(i, i[props.soulkey]);
}
alllist.value = Array.from(set);
list.value = alllist.value;
console.log(list.value);
selshow.value = false;
}, { deep: true });
const seltext = ref("");
watch(seltext, () => {
@@ -19141,14 +19164,22 @@ const _sfc_main$E = defineComponent({
}
}
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 openBlock(), createElementBlock("div", {
class: "soulbox",
style: normalizeStyle(`top: ${props.top}px;left:${props.left}px`),
onClick: _cache[6] || (_cache[6] = withModifiers(() => {
onClick: _cache[5] || (_cache[5] = withModifiers(() => {
}, ["stop"]))
}, [
createElementVNode("ul", null, [
createElementVNode("ul", { onMouseover: shubiao }, [
createElementVNode("li", {
onClick: asc,
class: "soul-sort",
@@ -19167,21 +19198,22 @@ const _sfc_main$E = defineComponent({
_hoisted_2$s,
createTextVNode(" \u964D\u5E8F\u6392\u5217 ")
]),
_hoisted_3$p,
createElementVNode("li", {
class: "soul-dropList",
style: {},
onMouseover: _cache[0] || (_cache[0] = ($event) => selshow.value = true)
onClick: daochu,
class: "soul-sort",
"data-value": "desc",
style: { "border-bottom": "1px solid rgb(230, 230, 230)" }
}, [
_hoisted_3$p,
createTextVNode(" \u7B5B\u9009\u6570\u636E "),
_hoisted_4$k
], 32)
]),
_hoisted_4$k,
createTextVNode(" \u5BFC\u51FAexcel ")
])
], 32),
withDirectives(createElementVNode("div", _hoisted_5$g, [
createVNode(_sfc_main$1w, {
"prefix-icon": "layui-icon-search",
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",
placeholder: "\u5173\u952E\u5B57\u641C\u7D22"
}, null, 8, ["modelValue"]),
@@ -19189,7 +19221,7 @@ const _sfc_main$E = defineComponent({
createElementVNode("div", {
class: "multiOption",
"data-type": "all",
onClick: _cache[2] || (_cache[2] = ($event) => select(1))
onClick: _cache[1] || (_cache[1] = ($event) => select(1))
}, [
_hoisted_7$c,
createTextVNode(" \u5168\u9009 ")
@@ -19197,7 +19229,7 @@ const _sfc_main$E = defineComponent({
createElementVNode("div", {
class: "multiOption",
"data-type": "none",
onClick: _cache[3] || (_cache[3] = ($event) => select(2))
onClick: _cache[2] || (_cache[2] = ($event) => select(2))
}, [
_hoisted_8$9,
createTextVNode(" \u6E05\u7A7A ")
@@ -19205,16 +19237,16 @@ const _sfc_main$E = defineComponent({
createElementVNode("div", {
class: "multiOption",
"data-type": "reverse",
onClick: _cache[4] || (_cache[4] = ($event) => select(3))
onClick: _cache[3] || (_cache[3] = ($event) => select(3))
}, [
_hoisted_9$7,
createTextVNode("\u53CD\u9009 ")
])
]),
createElementVNode("ul", null, [
createElementVNode("ul", _hoisted_10$7, [
createVNode(_sfc_main$$, {
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(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (i, j) => {
@@ -19342,7 +19374,8 @@ const _sfc_main$D = defineComponent({
getCheckboxProps: { type: Function, default: () => {
} },
getRadioProps: { type: Function, default: () => {
} }
} },
download: { default: "" }
},
emits: [
"change",
@@ -19546,7 +19579,7 @@ const _sfc_main$D = defineComponent({
}
tableStr += "</tr>";
}
tableDataSource.value.forEach((item, rowIndex) => {
datalist.value.forEach((item, rowIndex) => {
tableStr += "<tr>";
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
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>
</body>
</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;
};
function base64(s2) {
@@ -20177,12 +20213,14 @@ const _sfc_main$D = defineComponent({
withDirectives(createVNode(_sfc_main$E, {
top: soultop.value,
left: soulleft.value,
show: soulkey.value == column.key,
onAsc: asc,
onDesc: desc,
list: props.dataSource,
onDaochu: exportData,
list: datalist.value,
soulkey: column.key,
onSx: sx
}, null, 8, ["top", "left", "list", "soulkey"]), [
}, null, 8, ["top", "left", "show", "list", "soulkey"]), [
[vShow, soulkey.value == column.key]
])
]);