fangguo-component 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +68 -36
- package/dist/ArgHover.css +1 -0
- package/dist/ArgHover.vue_vue_type_style_index_0_lang-CMhRP09M.js +54 -0
- package/dist/ButtonGroup-C0yZEkxK.js +103 -0
- package/dist/ButtonGroup.css +1 -0
- package/dist/CitySelect.vue_vue_type_script_setup_true_lang-8EbHD3Nt.js +159 -0
- package/dist/ContentTitle-mqrusLjx.js +24 -0
- package/dist/ContentTitle.css +1 -0
- package/dist/CustomInputV2-DYEcbu5_.js +135 -0
- package/dist/CustomInputV2.css +1 -0
- package/dist/CustomMultipleInput-DDaqoHVU.js +109 -0
- package/dist/CustomMultipleInput.css +1 -0
- package/dist/DragResizable.css +1 -0
- package/dist/DragResizable.vue_vue_type_style_index_0_lang-DYL6TUPE.js +167 -0
- package/dist/DragSort-CfDeFAIG.js +66 -0
- package/dist/DragSort.css +1 -0
- package/dist/ErrorImage-CTP_5sal.js +32 -0
- package/dist/ErrorImage.css +1 -0
- package/dist/FgCascader.css +1 -0
- package/dist/FgCascader.vue_vue_type_style_index_0_lang-OnqaEAao.js +1807 -0
- package/dist/HSelect-Bqz2yTMf.js +468 -0
- package/dist/HSelect.css +1 -0
- package/dist/HSelectAll.vue_vue_type_script_setup_true_lang-C8i6LF_k.js +36 -0
- package/dist/HSelectSJ-BieRp2gG.js +462 -0
- package/dist/HSelectSJ.css +1 -0
- package/dist/IdentifyAddress.vue_vue_type_script_setup_true_lang-BJheMI1q.js +4743 -0
- package/dist/ImageLoupe.vue_vue_type_script_setup_true_lang-BlX4VbRi.js +79 -0
- package/dist/LazyComponent.vue_vue_type_script_setup_true_lang-vNk68D8E.js +82 -0
- package/dist/LazyPopover.vue_vue_type_script_setup_true_lang-DcOrcH0T.js +33 -0
- package/dist/LoadingBtn-BhbhNboo.js +66 -0
- package/dist/LoadingBtn.css +1 -0
- package/dist/{MInput-CO6YUVuZ.js → MInput-CpoW17Wh.js} +6 -6
- package/dist/MInput.css +1 -1
- package/dist/MyTable-DmwyEVJb.js +68 -0
- package/dist/MyTable.css +1 -0
- package/dist/NoRender.vue_vue_type_script_setup_true_lang-Do36nSsV.js +30 -0
- package/dist/SelectAddress-B4oK5erq.js +173 -0
- package/dist/SelectAddress.css +1 -0
- package/dist/SelectAll.vue_vue_type_script_setup_true_lang-BC3q2U8f.js +79 -0
- package/dist/SelectAll2.vue_vue_type_script_setup_true_lang-CaET5eli.js +74 -0
- package/dist/SelectCustomAll.css +1 -0
- package/dist/SelectCustomAll.vue_vue_type_style_index_0_lang-_wCRO217.js +83 -0
- package/dist/SelectTimePicker.vue_vue_type_script_setup_true_lang-Bj0KMOKv.js +45 -0
- package/dist/SelectTree-C7lBZnZH.js +306 -0
- package/dist/SelectTree.css +1 -0
- package/dist/SortTransfer.css +1 -0
- package/dist/SortTransfer.vue_vue_type_style_index_0_lang-C5OmBF3s.js +153 -0
- package/dist/SvgIcon-C2ah8E0Z.js +30 -0
- package/dist/TextCopy.vue_vue_type_script_setup_true_lang-DbhZGH_z.js +29 -0
- package/dist/TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-aZbEQmbM.js +112 -0
- package/dist/TipInput-CIskitOV.js +117 -0
- package/dist/TipInput.css +1 -0
- package/dist/VirtualTable-BYTfwDC1.js +353 -0
- package/dist/VirtualTable.css +1 -0
- package/dist/_commonjsHelpers-ByYUsBRP.js +33 -0
- package/dist/common-BIEgCXbl.js +7030 -0
- package/dist/components/VirtualTable/VirtualTable.vue.d.ts +127 -0
- package/dist/components/VirtualTable/index.d.ts +1 -0
- package/dist/components/VirtualTable/index.js +4 -0
- package/dist/components/argHover/ArgHover.vue.d.ts +51 -0
- package/dist/components/argHover/index.d.ts +1 -0
- package/dist/components/argHover/index.js +4 -0
- package/dist/components/buttonGroup/ButtonGroup.vue.d.ts +17 -0
- package/dist/components/buttonGroup/index.d.ts +1 -0
- package/dist/components/buttonGroup/index.js +4 -0
- package/dist/components/cascader/cascader/{cascader.vue.d.ts → ElCascader.vue.d.ts} +43 -43
- package/dist/components/cascader/cascader/FgCascader.vue.d.ts +4192 -0
- package/dist/components/cascader/cascader/index.d.ts +1 -3
- package/dist/components/cascader/cascader-panel/index.vue.d.ts +8 -8
- package/dist/components/cascader/cascader-panel/menu.vue.d.ts +3 -3
- package/dist/components/cascader/cascader-panel/node.vue.d.ts +2 -2
- package/dist/components/cascader/index.d.ts +1 -3
- package/dist/components/cascader/index.js +1 -1
- package/dist/components/cascader/utils/vue/props/util.d.ts +0 -1
- package/dist/components/cascader/utils/vue/size.d.ts +1 -1
- package/dist/components/citySelect/CitySelect.vue.d.ts +21 -0
- package/dist/components/citySelect/index.d.ts +1 -0
- package/dist/components/citySelect/index.js +4 -0
- package/dist/components/contentTitle/ContentTitle.vue.d.ts +20 -0
- package/dist/components/contentTitle/index.d.ts +1 -0
- package/dist/components/contentTitle/index.js +4 -0
- package/dist/components/customInputV2/CustomInputV2.vue.d.ts +47 -0
- package/dist/components/customInputV2/index.d.ts +1 -0
- package/dist/components/customInputV2/index.js +4 -0
- package/dist/components/customMultipleInput/CustomMultipleInput.vue.d.ts +46 -0
- package/dist/components/customMultipleInput/index.d.ts +1 -0
- package/dist/components/customMultipleInput/index.js +4 -0
- package/dist/components/dragResizable/DragResizable.vue.d.ts +57 -0
- package/dist/components/dragResizable/index.d.ts +1 -0
- package/dist/components/dragResizable/index.js +4 -0
- package/dist/components/dragSort/DragSort.vue.d.ts +34 -0
- package/dist/components/dragSort/index.d.ts +1 -0
- package/dist/components/dragSort/index.js +4 -0
- package/dist/components/errorImage/ErrorImage.vue.d.ts +23 -0
- package/dist/components/errorImage/index.d.ts +1 -0
- package/dist/components/errorImage/index.js +4 -0
- package/dist/components/hSelect/HSelect.vue.d.ts +103 -0
- package/dist/components/hSelect/index.d.ts +1 -0
- package/dist/components/hSelect/index.js +4 -0
- package/dist/components/hSelectAll/HSelectAll.vue.d.ts +10 -0
- package/dist/components/hSelectAll/index.d.ts +1 -0
- package/dist/components/hSelectAll/index.js +4 -0
- package/dist/components/hSelectSJ/HSelectSJ.vue.d.ts +105 -0
- package/dist/components/hSelectSJ/index.d.ts +1 -0
- package/dist/components/hSelectSJ/index.js +4 -0
- package/dist/components/identifyAddress/IdentifyAddress.vue.d.ts +10 -0
- package/dist/components/identifyAddress/index.d.ts +1 -0
- package/dist/components/identifyAddress/index.js +4 -0
- package/dist/components/imageLoupe/ImageLoupe.vue.d.ts +35 -0
- package/dist/components/imageLoupe/index.d.ts +1 -0
- package/dist/components/imageLoupe/index.js +4 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/components/index.js +66 -4
- package/dist/components/lazyComponent/LazyComponent.vue.d.ts +37 -0
- package/dist/components/lazyComponent/index.d.ts +1 -0
- package/dist/components/lazyComponent/index.js +4 -0
- package/dist/components/lazyPopover/LazyPopover.vue.d.ts +31 -0
- package/dist/components/lazyPopover/index.d.ts +1 -0
- package/dist/components/lazyPopover/index.js +4 -0
- package/dist/components/loadingBtn/LoadingBtn.vue.d.ts +34 -0
- package/dist/components/loadingBtn/index.d.ts +1 -0
- package/dist/components/loadingBtn/index.js +4 -0
- package/dist/components/mInput/index.js +1 -1
- package/dist/components/myTable/MyTable.vue.d.ts +46 -0
- package/dist/components/myTable/index.d.ts +1 -0
- package/dist/components/myTable/index.js +4 -0
- package/dist/components/noRender/NoRender.vue.d.ts +23 -0
- package/dist/components/noRender/index.d.ts +1 -0
- package/dist/components/noRender/index.js +4 -0
- package/dist/components/selectAddress/SelectAddress.vue.d.ts +106 -0
- package/dist/components/selectAddress/index.d.ts +1 -0
- package/dist/components/selectAddress/index.js +4 -0
- package/dist/components/selectAll/SelectAll.vue.d.ts +124 -0
- package/dist/components/selectAll/index.d.ts +1 -0
- package/dist/components/selectAll/index.js +4 -0
- package/dist/components/selectAll2/SelectAll2.vue.d.ts +81 -0
- package/dist/components/selectAll2/index.d.ts +1 -0
- package/dist/components/selectAll2/index.js +4 -0
- package/dist/components/selectCustomAll/SelectCustomAll.vue.d.ts +77 -0
- package/dist/components/selectCustomAll/index.d.ts +1 -0
- package/dist/components/selectCustomAll/index.js +4 -0
- package/dist/components/selectTimePicker/SelectTimePicker.vue.d.ts +24 -0
- package/dist/components/selectTimePicker/index.d.ts +1 -0
- package/dist/components/selectTimePicker/index.js +4 -0
- package/dist/components/selectTree/SelectTree.vue.d.ts +39 -0
- package/dist/components/selectTree/index.d.ts +1 -0
- package/dist/components/selectTree/index.js +4 -0
- package/dist/components/sortTransfer/SortTransfer.vue.d.ts +97 -0
- package/dist/components/sortTransfer/index.d.ts +1 -0
- package/dist/components/sortTransfer/index.js +4 -0
- package/dist/components/svgIcon/index.d.ts +1 -0
- package/dist/components/svgIcon/index.js +4 -0
- package/dist/components/textCopy/TextCopy.vue.d.ts +21 -0
- package/dist/components/textCopy/index.d.ts +1 -0
- package/dist/components/textCopy/index.js +4 -0
- package/dist/components/textEllipsisTooltip/TextEllipsisTooltip.vue.d.ts +19 -0
- package/dist/components/textEllipsisTooltip/index.d.ts +1 -0
- package/dist/components/textEllipsisTooltip/index.js +4 -0
- package/dist/components/tipInput/TipInput.vue.d.ts +56 -0
- package/dist/components/tipInput/index.d.ts +1 -0
- package/dist/components/tipInput/index.js +4 -0
- package/dist/dateShortcuts-DDPtAhDI.js +26 -0
- package/dist/debounce-BLrZUqsA.js +84 -0
- package/dist/index-BKzmtfeu.js +72 -0
- package/dist/index-DIX8TpoT.js +118 -0
- package/dist/index-epuVZjZV.js +103 -0
- package/dist/index-uf7oyYDF.js +16847 -0
- package/dist/index.d.ts +161 -5
- package/dist/index.js +197 -46
- package/dist/isEqual-qYQTJBU6.js +506 -0
- package/dist/isObject-CO569sPG.js +35 -0
- package/dist/shims.d.ts +53 -13
- package/dist/tools/ImageParserUtils/common.d.ts +117 -0
- package/dist/tools/ImageParserUtils/etagBrowser.d.ts +4 -0
- package/dist/tools/ImageParserUtils/index.d.ts +7 -0
- package/dist/tools/ImageParserUtils/index.js +13116 -0
- package/dist/tools/ImageParserUtils/parseImage.d.ts +18 -0
- package/dist/tools/ImageParserUtils/parsePSD.d.ts +22 -0
- package/dist/tools/ImageParserUtils/parseTIFF.d.ts +18 -0
- package/dist/tools/common/common.d.ts +335 -23
- package/dist/tools/common/dateShortcuts.d.ts +5 -0
- package/dist/tools/common/index.d.ts +1 -0
- package/dist/tools/common/index.js +86 -5085
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +97 -8
- package/package.json +92 -81
- package/dist/cascader.css +0 -1
- package/dist/cascader.vue_vue_type_script_setup_true_lang-HFhhhQva.js +0 -2268
- package/dist/index-DihzpZcR.js +0 -14
- package/dist/index-wUcQXc_Z.js +0 -10
- package/dist/tools/Grid/Grid.d.ts +0 -48
- package/dist/tools/Grid/index.d.ts +0 -1
- package/dist/tools/Grid/index.js +0 -217
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { openBlock as o, createElementBlock as t, createElementVNode as r, defineComponent as s, computed as c } from "vue";
|
|
2
|
+
import { _ as i } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const p = s({
|
|
4
|
+
name: "SvgIcon",
|
|
5
|
+
props: {
|
|
6
|
+
prefix: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "icon"
|
|
9
|
+
},
|
|
10
|
+
name: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: !0
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(e) {
|
|
16
|
+
return { symbolId: c(() => `#${e.prefix}-${e.name}`) };
|
|
17
|
+
}
|
|
18
|
+
}), a = {
|
|
19
|
+
class: "svgicon",
|
|
20
|
+
"aria-hidden": "true"
|
|
21
|
+
}, d = ["xlink:href"];
|
|
22
|
+
function m(e, n, l, f, u, _) {
|
|
23
|
+
return o(), t("svg", a, [
|
|
24
|
+
r("use", { "xlink:href": e.symbolId }, null, 8, d)
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
const x = /* @__PURE__ */ i(p, [["render", m]]);
|
|
28
|
+
export {
|
|
29
|
+
x as S
|
|
30
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as o, createElementBlock as n, createElementVNode as r, normalizeStyle as a, toDisplayString as i, unref as c, createCommentVNode as m } from "vue";
|
|
2
|
+
import { m as s } from "./common-BIEgCXbl.js";
|
|
3
|
+
const x = { class: "leading-[16px]" }, y = /* @__PURE__ */ l({
|
|
4
|
+
__name: "TextCopy",
|
|
5
|
+
props: {
|
|
6
|
+
text: String,
|
|
7
|
+
defaultSymbol: {
|
|
8
|
+
default: "-"
|
|
9
|
+
},
|
|
10
|
+
color: {
|
|
11
|
+
default: "#0b0c24"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(t) {
|
|
15
|
+
return (d, e) => (o(), n("span", x, [
|
|
16
|
+
r("span", {
|
|
17
|
+
style: a({ color: t.color })
|
|
18
|
+
}, i(t.text || t.defaultSymbol), 5),
|
|
19
|
+
t.text ? (o(), n("i", {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "iconfont icon-fuzhidingdan ml-[4px] text-[12px] text-fill-900 cursor-pointer transition-all hover:text-primary",
|
|
22
|
+
onClick: e[0] || (e[0] = (f) => c(s)(t.text))
|
|
23
|
+
})) : m("", !0)
|
|
24
|
+
]));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
y as _
|
|
29
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { defineComponent as S, ref as c, watch as B, onMounted as T, resolveComponent as $, openBlock as p, createBlock as N, withCtx as E, createElementVNode as H, mergeProps as k, toDisplayString as y, createElementBlock as L, nextTick as j } from "vue";
|
|
2
|
+
const O = /* @__PURE__ */ S({
|
|
3
|
+
__name: "TextEllipsisTooltip",
|
|
4
|
+
props: {
|
|
5
|
+
value: { default: "" },
|
|
6
|
+
row: { default: 1 },
|
|
7
|
+
width: { default: "100%" },
|
|
8
|
+
textAlign: { default: "center" },
|
|
9
|
+
max: { default: null },
|
|
10
|
+
contentClass: { default: "" },
|
|
11
|
+
unit: { default: "种" }
|
|
12
|
+
},
|
|
13
|
+
setup(s) {
|
|
14
|
+
const e = s, o = c(!1), r = c({
|
|
15
|
+
width: e.width
|
|
16
|
+
}), h = c(), a = c(""), f = (t) => {
|
|
17
|
+
h.value = t;
|
|
18
|
+
}, A = () => {
|
|
19
|
+
e.value ? g() : (a.value = e.value, o.value = !1, r.value = {
|
|
20
|
+
width: e.width,
|
|
21
|
+
wordBreak: "break-all",
|
|
22
|
+
textAlign: e.textAlign
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
function b(t, n, i = "") {
|
|
26
|
+
if (!t || t.length === 0 || n <= 0)
|
|
27
|
+
return { text: "", isComplete: !0 };
|
|
28
|
+
let u = "", v = 0, l = 0;
|
|
29
|
+
for (l = 0; l < t.length; l++) {
|
|
30
|
+
const C = l === 0 ? t[l] : i + t[l], m = v + C.length;
|
|
31
|
+
if (m >= n)
|
|
32
|
+
break;
|
|
33
|
+
u = l === 0 ? t[l] : u + i + t[l], v = m;
|
|
34
|
+
}
|
|
35
|
+
const d = l === t.length;
|
|
36
|
+
return {
|
|
37
|
+
text: u,
|
|
38
|
+
isComplete: d
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const w = () => {
|
|
42
|
+
var t, n, i, u, v;
|
|
43
|
+
if (e.max) {
|
|
44
|
+
const { text: l, isComplete: d } = b(e.value, e.max, ",");
|
|
45
|
+
d ? (a.value = l, o.value = !1) : (a.value = l + `等${(t = e.value) == null ? void 0 : t.length}${e.unit}`, o.value = !0);
|
|
46
|
+
} else
|
|
47
|
+
Number((n = e.value) == null ? void 0 : n.length) > 1 ? (a.value = ((i = e.value) == null ? void 0 : i[0]) + `等${(u = e.value) == null ? void 0 : u.length}${e.unit}`, o.value = !0) : (a.value = (v = e.value) == null ? void 0 : v[0], o.value = !1);
|
|
48
|
+
r.value = {
|
|
49
|
+
width: e.width,
|
|
50
|
+
wordBreak: "break-all",
|
|
51
|
+
textAlign: e.textAlign
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
B([() => e.value, () => e.width, () => e.row, () => e.max], () => {
|
|
55
|
+
var t;
|
|
56
|
+
Array.isArray(e.value) && ((t = e.value) != null && t.length) ? w() : A();
|
|
57
|
+
});
|
|
58
|
+
const x = () => {
|
|
59
|
+
const t = Number(getComputedStyle(h.value).lineHeight.replace("px", "")), n = Number(getComputedStyle(h.value).height.replace("px", ""));
|
|
60
|
+
return e.max ? !1 : n > t * e.row * 1.2 ? (o.value = !0, r.value = {
|
|
61
|
+
overflow: "hidden",
|
|
62
|
+
textOverflow: "ellipsis",
|
|
63
|
+
display: "-webkit-box",
|
|
64
|
+
webkitLineClamp: e.row,
|
|
65
|
+
webkitBoxOrient: "vertical",
|
|
66
|
+
cursor: "pointer",
|
|
67
|
+
width: e.width,
|
|
68
|
+
wordBreak: "break-all",
|
|
69
|
+
textAlign: e.textAlign
|
|
70
|
+
}, !0) : !1;
|
|
71
|
+
}, g = () => {
|
|
72
|
+
var t;
|
|
73
|
+
a.value = e.max ? (t = e.value) == null ? void 0 : t.substring(0, e.max) : e.value, o.value = !1, r.value = {
|
|
74
|
+
width: e.width,
|
|
75
|
+
wordBreak: "break-all",
|
|
76
|
+
textAlign: e.textAlign
|
|
77
|
+
}, j(() => {
|
|
78
|
+
setTimeout(() => {
|
|
79
|
+
var n, i;
|
|
80
|
+
e.max ? x() || (a.value = ((n = e.value) == null ? void 0 : n.length) > e.max ? a.value + "..." : a.value, o.value = ((i = e.value) == null ? void 0 : i.length) > e.max) : x();
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
return T(() => {
|
|
85
|
+
Array.isArray(e.value) ? w() : g();
|
|
86
|
+
}), (t, n) => {
|
|
87
|
+
const i = $("el-tooltip");
|
|
88
|
+
return o.value ? (p(), N(i, {
|
|
89
|
+
key: 0,
|
|
90
|
+
content: `<div class='${s.contentClass}'>${Array.isArray(s.value) ? s.value.join(",") : s.value}</div>`,
|
|
91
|
+
"raw-content": "",
|
|
92
|
+
effect: "dark",
|
|
93
|
+
placement: "top-start",
|
|
94
|
+
"visible-arrow": !1
|
|
95
|
+
}, {
|
|
96
|
+
default: E(() => [
|
|
97
|
+
H("div", k({
|
|
98
|
+
ref: f,
|
|
99
|
+
style: { cursor: "pointer" }
|
|
100
|
+
}, t.$attrs, { style: r.value }), y(a.value), 17)
|
|
101
|
+
]),
|
|
102
|
+
_: 1
|
|
103
|
+
}, 8, ["content"])) : (p(), L("div", k({
|
|
104
|
+
key: 1,
|
|
105
|
+
style: r.value
|
|
106
|
+
}, t.$attrs, { ref: f }), y(a.value), 17));
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
export {
|
|
111
|
+
O as _
|
|
112
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { defineComponent as h, ref as p, computed as S, resolveComponent as $, openBlock as r, createElementBlock as v, normalizeClass as c, createElementVNode as o, toDisplayString as d, createBlock as B, withCtx as y, withDirectives as m, vModelDynamic as g, vShow as V, createCommentVNode as b } from "vue";
|
|
2
|
+
import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
import './TipInput.css';const F = ["maxlength", "type"], I = ["maxlength", "type"], N = { class: "flex items-center" }, R = /* @__PURE__ */ h({
|
|
4
|
+
__name: "TipInput",
|
|
5
|
+
props: {
|
|
6
|
+
placeholder: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: () => ""
|
|
9
|
+
},
|
|
10
|
+
value: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: () => ""
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: () => "text"
|
|
17
|
+
},
|
|
18
|
+
errorTip: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: () => ""
|
|
21
|
+
},
|
|
22
|
+
maxlength: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: () => 20
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
emits: ["update:value"],
|
|
28
|
+
setup(i, { emit: x }) {
|
|
29
|
+
const s = p(), u = i, a = p(!1), l = p(u.type), k = x, n = S({
|
|
30
|
+
get() {
|
|
31
|
+
return u.value;
|
|
32
|
+
},
|
|
33
|
+
set(f) {
|
|
34
|
+
k("update:value", f);
|
|
35
|
+
}
|
|
36
|
+
}), w = () => {
|
|
37
|
+
l.value === "text" ? l.value = "password" : l.value = "text";
|
|
38
|
+
}, C = () => {
|
|
39
|
+
s.value.focus();
|
|
40
|
+
};
|
|
41
|
+
return (f, e) => {
|
|
42
|
+
const T = $("el-popover");
|
|
43
|
+
return r(), v("figure", {
|
|
44
|
+
class: c([{ focus: a.value || !!n.value }, "tip-input-wrap"])
|
|
45
|
+
}, [
|
|
46
|
+
o("div", {
|
|
47
|
+
class: "flex relative flex-1 items-center",
|
|
48
|
+
onClick: C
|
|
49
|
+
}, [
|
|
50
|
+
o("label", null, d(i.placeholder), 1),
|
|
51
|
+
u.errorTip ? (r(), B(T, {
|
|
52
|
+
key: 0,
|
|
53
|
+
placement: "left",
|
|
54
|
+
width: 188,
|
|
55
|
+
trigger: "click",
|
|
56
|
+
offset: 40
|
|
57
|
+
}, {
|
|
58
|
+
reference: y(() => [
|
|
59
|
+
m(o("input", {
|
|
60
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => n.value = t),
|
|
61
|
+
onFocus: e[1] || (e[1] = (t) => a.value = !0),
|
|
62
|
+
onBlur: e[2] || (e[2] = (t) => a.value = !1),
|
|
63
|
+
maxlength: i.maxlength,
|
|
64
|
+
type: l.value,
|
|
65
|
+
ref_key: "inputRef",
|
|
66
|
+
ref: s
|
|
67
|
+
}, null, 40, F), [
|
|
68
|
+
[
|
|
69
|
+
g,
|
|
70
|
+
n.value,
|
|
71
|
+
void 0,
|
|
72
|
+
{ trim: !0 }
|
|
73
|
+
]
|
|
74
|
+
])
|
|
75
|
+
]),
|
|
76
|
+
default: y(() => [
|
|
77
|
+
o("p", null, d(u.errorTip), 1)
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
})) : m((r(), v("input", {
|
|
81
|
+
key: 1,
|
|
82
|
+
"onUpdate:modelValue": e[3] || (e[3] = (t) => n.value = t),
|
|
83
|
+
onFocus: e[4] || (e[4] = (t) => a.value = !0),
|
|
84
|
+
onBlur: e[5] || (e[5] = (t) => a.value = !1),
|
|
85
|
+
maxlength: i.maxlength,
|
|
86
|
+
type: l.value,
|
|
87
|
+
ref_key: "inputRef",
|
|
88
|
+
ref: s
|
|
89
|
+
}, null, 40, I)), [
|
|
90
|
+
[
|
|
91
|
+
g,
|
|
92
|
+
n.value,
|
|
93
|
+
void 0,
|
|
94
|
+
{ trim: !0 }
|
|
95
|
+
]
|
|
96
|
+
])
|
|
97
|
+
]),
|
|
98
|
+
o("div", N, [
|
|
99
|
+
m(o("i", {
|
|
100
|
+
class: "iconfont icon-danchuangguanbi",
|
|
101
|
+
onClick: e[6] || (e[6] = (t) => n.value = "")
|
|
102
|
+
}, null, 512), [
|
|
103
|
+
[V, !!n.value]
|
|
104
|
+
]),
|
|
105
|
+
u.type === "password" ? (r(), v("i", {
|
|
106
|
+
key: 0,
|
|
107
|
+
class: c(`eye iconfont !text-[16px] icon-${l.value === "password" ? "yincangmima-xin" : "xianshimima-xin"}`),
|
|
108
|
+
onClick: w
|
|
109
|
+
}, null, 2)) : b("", !0)
|
|
110
|
+
])
|
|
111
|
+
], 2);
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}), U = /* @__PURE__ */ D(R, [["__scopeId", "data-v-9b8163e3"]]);
|
|
115
|
+
export {
|
|
116
|
+
U as T
|
|
117
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tip-input-wrap.focus label[data-v-9b8163e3]{top:4px;font-size:12px;pointer-events:none}.tip-input-wrap[data-v-9b8163e3]{display:flex;padding:0 16px;height:52px;background:#f5f7fa;border-radius:8px}.tip-input-wrap input[data-v-9b8163e3]{display:block;padding:20px 0 0;width:100%;height:52px;font-size:16px;color:#222;background:none;border:none;outline:none;letter-spacing:0;line-height:16px;flex:1;-webkit-appearance:none;appearance:none}.tip-input-wrap label[data-v-9b8163e3]{position:absolute;top:calc(50% - 10px);left:0;font-size:16px;color:#828282;transition:all .1s linear}.tip-input-wrap .iconfont[data-v-9b8163e3]{font-size:12px;color:#ccc;cursor:pointer}.tip-input-wrap .iconfont.eye[data-v-9b8163e3]{margin-left:20px;color:#999}.tip-input-wrap .eye.icon-xianshimima[data-v-9b8163e3]{font-size:16px}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import './VirtualTable.css';var he = Object.defineProperty, pe = Object.defineProperties;
|
|
2
|
+
var fe = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var G = Object.getOwnPropertySymbols;
|
|
4
|
+
var ve = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var J = (b, h, d) => h in b ? he(b, h, { enumerable: !0, configurable: !0, writable: !0, value: d }) : b[h] = d, _ = (b, h) => {
|
|
6
|
+
for (var d in h || (h = {}))
|
|
7
|
+
ve.call(h, d) && J(b, d, h[d]);
|
|
8
|
+
if (G)
|
|
9
|
+
for (var d of G(h))
|
|
10
|
+
be.call(h, d) && J(b, d, h[d]);
|
|
11
|
+
return b;
|
|
12
|
+
}, g = (b, h) => pe(b, fe(h));
|
|
13
|
+
var q = (b, h, d) => new Promise((S, l) => {
|
|
14
|
+
var $ = (m) => {
|
|
15
|
+
try {
|
|
16
|
+
w(d.next(m));
|
|
17
|
+
} catch (k) {
|
|
18
|
+
l(k);
|
|
19
|
+
}
|
|
20
|
+
}, B = (m) => {
|
|
21
|
+
try {
|
|
22
|
+
w(d.throw(m));
|
|
23
|
+
} catch (k) {
|
|
24
|
+
l(k);
|
|
25
|
+
}
|
|
26
|
+
}, w = (m) => m.done ? S(m.value) : Promise.resolve(m.value).then($, B);
|
|
27
|
+
w((d = d.apply(b, h)).next());
|
|
28
|
+
});
|
|
29
|
+
import { defineComponent as Q, ref as x, computed as X, watch as K, reactive as we, onMounted as ye, nextTick as me, resolveDirective as _e, withDirectives as ge, openBlock as xe, createBlock as Re, unref as Ce } from "vue";
|
|
30
|
+
import { ElEmpty as Se, ElBacktop as ke, ElCheckbox as Y } from "element-plus";
|
|
31
|
+
import { DynamicScroller as Ee, DynamicScrollerItem as Z } from "vue-virtual-scroller";
|
|
32
|
+
import { d as We } from "./debounce-BLrZUqsA.js";
|
|
33
|
+
import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
34
|
+
const De = "_border_k5pxi_15", He = "_scroll_k5pxi_37", s = {
|
|
35
|
+
"dynamic-scroller-ref": "_dynamic-scroller-ref_k5pxi_1",
|
|
36
|
+
border: De,
|
|
37
|
+
"virtual-table-row-td": "_virtual-table-row-td_k5pxi_18",
|
|
38
|
+
scroll: He,
|
|
39
|
+
"virtual-table-header": "_virtual-table-header_k5pxi_37",
|
|
40
|
+
"virtual-table-row-th": "_virtual-table-row-th_k5pxi_40",
|
|
41
|
+
"virtual-table-row": "_virtual-table-row_k5pxi_18",
|
|
42
|
+
"virtual-table-row-tr": "_virtual-table-row-tr_k5pxi_43",
|
|
43
|
+
"shadow-right": "_shadow-right_k5pxi_72",
|
|
44
|
+
"shadow-left": "_shadow-left_k5pxi_85",
|
|
45
|
+
"sort-wrapper": "_sort-wrapper_k5pxi_99",
|
|
46
|
+
"scroll-item-class": "_scroll-item-class_k5pxi_170"
|
|
47
|
+
}, ze = /* @__PURE__ */ Q({
|
|
48
|
+
__name: "VirtualTable",
|
|
49
|
+
props: {
|
|
50
|
+
items: { default: () => [] },
|
|
51
|
+
width: { default: "100%" },
|
|
52
|
+
height: { default: 600 },
|
|
53
|
+
rowKey: { default: "id" },
|
|
54
|
+
minItemSize: { default: 20 },
|
|
55
|
+
border: { type: Boolean, default: !0 },
|
|
56
|
+
pageNo: { default: 1 },
|
|
57
|
+
pageSize: {},
|
|
58
|
+
noHeader: { type: Boolean },
|
|
59
|
+
headerSlotRender: {},
|
|
60
|
+
afterSlotRender: {},
|
|
61
|
+
emptySlotRender: {},
|
|
62
|
+
expandSlotRender: {},
|
|
63
|
+
defaultSort: {},
|
|
64
|
+
tableColumn: { default: () => [] },
|
|
65
|
+
backTop: { type: Boolean, default: !0 },
|
|
66
|
+
scroll: { type: Boolean, default: !0 },
|
|
67
|
+
wrapClass: { default: "" },
|
|
68
|
+
itemClass: { default: "" },
|
|
69
|
+
cacheSelection: { type: Boolean, default: !1 },
|
|
70
|
+
scrollHandle: { default: null },
|
|
71
|
+
scrolldelay: { default: 10 },
|
|
72
|
+
itemHandle: { type: Function, default: () => ({}) },
|
|
73
|
+
rowClassName: { type: [Function, String], default: () => "" },
|
|
74
|
+
rowStyle: { type: Function, default: () => ({}) },
|
|
75
|
+
spanMethod: {},
|
|
76
|
+
childrenRender: {},
|
|
77
|
+
selectable: { type: Function, default: () => !1 }
|
|
78
|
+
},
|
|
79
|
+
emits: ["sort-change", "select", "select-all", "selection-change", "row-click"],
|
|
80
|
+
setup(b, { expose: h, emit: d }) {
|
|
81
|
+
const S = d, l = b, $ = x(!1), B = x(!0), w = x(), m = X(() => {
|
|
82
|
+
const { width: e, height: t } = l;
|
|
83
|
+
return {
|
|
84
|
+
with: typeof e == "string" ? e : `${e}px`,
|
|
85
|
+
height: typeof t == "string" ? t : `${t}px`
|
|
86
|
+
};
|
|
87
|
+
}), k = x();
|
|
88
|
+
function f(e, t = 0) {
|
|
89
|
+
if (!e)
|
|
90
|
+
return 0;
|
|
91
|
+
if (typeof e == "number")
|
|
92
|
+
return Math.max(t, e);
|
|
93
|
+
let r = 0;
|
|
94
|
+
return e.endsWith("px") && (r = parseFloat(e.replace("px", ""))), e.endsWith("%") && (r = parseFloat(e.replace("%", "")) / 100 * k.value), Math.max(t, r);
|
|
95
|
+
}
|
|
96
|
+
const ee = () => l.tableColumn.reduce((e, t) => {
|
|
97
|
+
const r = t.type === "select" ? f(t.width || 30, t.minWidth) : t.type === "number" ? f(t.width || 50, t.minWidth) : t.width === void 0 ? 0 : f(t.width, t.minWidth);
|
|
98
|
+
return e + r;
|
|
99
|
+
}, 0), U = (e, t, r = 1, o = 1, u, a) => {
|
|
100
|
+
let n = u || (e.type === "select" ? f(e.width || 30, e.minWidth) : e.type === "number" ? f(e.width || 50, e.minWidth) : e.width === void 0 ? "unset" : f(e.width, e.minWidth));
|
|
101
|
+
if (o !== 1)
|
|
102
|
+
if (o === 0)
|
|
103
|
+
n += "0px!important";
|
|
104
|
+
else {
|
|
105
|
+
for (let i = t + 1; i < t + o; i++)
|
|
106
|
+
n += l.tableColumn[i].type === "select" ? f(l.tableColumn[i].width || 30, l.tableColumn[i].minWidth) : l.tableColumn[i].type === "number" ? f(l.tableColumn[i].width || 50, l.tableColumn[i].minWidth) : l.tableColumn[i].width === void 0 ? 0 : f(l.tableColumn[i].width, l.tableColumn[i].minWidth);
|
|
107
|
+
n += "px!important";
|
|
108
|
+
}
|
|
109
|
+
let W = 0, C = 0;
|
|
110
|
+
e.fixed === "left" && t !== 0 && (W = l.tableColumn.slice(0, t).reduce((i, c) => i + (c.fixed === "left" ? c.type === "select" ? f(c.width || 30, c.minWidth) : c.type === "number" ? f(c.width || 50, c.minWidth) : f(c.width, c.minWidth) : 0), 0)), e.fixed === "right" && t !== l.tableColumn.length - 1 && (C = l.tableColumn.slice(t + 1, l.tableColumn.length).reduce((i, c) => i + (c.fixed === "right" ? c.type === "select" ? f(c.width || 30, c.minWidth) : c.type === "number" ? f(c.width || 50, c.minWidth) : f(c.width, c.minWidth) : 0), 0));
|
|
111
|
+
const D = {
|
|
112
|
+
flex: n === "unset" ? 1 : "unset",
|
|
113
|
+
minWidth: e.minWidth ? `${e.minWidth}px` : "unset",
|
|
114
|
+
width: typeof n == "string" ? n : `${n}px`,
|
|
115
|
+
height: a || (r === 1 ? "unset" : `${r * l.minItemSize}px`),
|
|
116
|
+
position: e.fixed ? "sticky" : "relative",
|
|
117
|
+
left: e.fixed === "left" ? `${W}px` : "unset",
|
|
118
|
+
right: e.fixed === "right" ? `${C}px` : "unset",
|
|
119
|
+
justifyContent: e.align === "left" ? "flex-start" : e.align === "right" ? "flex-end" : "center",
|
|
120
|
+
zIndex: e.fixed === "left" ? 3 : e.fixed === "right" ? l.tableColumn.length - t + 1 : 1
|
|
121
|
+
};
|
|
122
|
+
return e.customStyle && Object.assign(D, e.customStyle), D;
|
|
123
|
+
}, R = (e) => e.fixed === "right" && !$.value ? s["shadow-right"] : e.fixed === "left" && !B.value ? s["shadow-left"] : "", le = We((e) => {
|
|
124
|
+
var t;
|
|
125
|
+
$.value = e.target.clientWidth + e.target.scrollLeft + 5 >= e.target.scrollWidth, B.value = e.target.scrollLeft === 0, (t = l.scrollHandle) == null || t.call(l, e);
|
|
126
|
+
}, l.scrolldelay), I = x(!1), v = x([]), H = x([]), te = (e, t) => {
|
|
127
|
+
S("select-all", z()), S("selection-change", z());
|
|
128
|
+
}, V = X(() => {
|
|
129
|
+
const e = p.value.filter((t) => !t.__ischildren);
|
|
130
|
+
return {
|
|
131
|
+
length: p.value.length,
|
|
132
|
+
ml: e.length,
|
|
133
|
+
cl: p.value.length - e.length
|
|
134
|
+
};
|
|
135
|
+
}), re = () => {
|
|
136
|
+
I.value = !1, v.value = [], p.value.forEach((e) => {
|
|
137
|
+
e.rowcheck = !1;
|
|
138
|
+
});
|
|
139
|
+
}, z = () => v.value, A = (e, t) => {
|
|
140
|
+
const r = p.value.find((a) => a[l.rowKey] === e);
|
|
141
|
+
if (!r) {
|
|
142
|
+
console.log("当前无该条数据");
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
r.rowcheck = t;
|
|
146
|
+
const o = [], u = [];
|
|
147
|
+
p.value.forEach((a) => {
|
|
148
|
+
a.disabled && u.push(a), a.rowcheck && !(a != null && a.disabled) && o.push(a);
|
|
149
|
+
}), v.value = o, H.value = u, I.value = v.value.length + H.value.length === V.value.ml && !!v.value.length;
|
|
150
|
+
}, p = x([]);
|
|
151
|
+
K(
|
|
152
|
+
() => l.items,
|
|
153
|
+
() => {
|
|
154
|
+
if (E = 0, l.cacheSelection) {
|
|
155
|
+
const e = [], t = [];
|
|
156
|
+
p.value = l.items.map((r) => {
|
|
157
|
+
r.disabled && t.push(r);
|
|
158
|
+
const o = v.value.find((n) => n[l.rowKey] === r[l.rowKey]), u = l.tableColumn.find((n) => n.type === "select"), a = u && u.selectable && typeof u.selectable == "function" ? u.selectable(r) : !0;
|
|
159
|
+
return o && e.push(g(_({}, r), { rowcheck: !!o, disabled: !a })), r.__ischildren ? g(_({}, r), { __index: E, rowcheck: !!o, disabled: !a }) : g(_({}, r), { __index: E++, rowcheck: !!o, disabled: !a });
|
|
160
|
+
}), v.value = e, H.value = t, I.value = v.value.length + H.value.length === V.value.ml && !!v.value.length, S("selection-change", z());
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
I.value = !1, v.value = [], p.value = l.items.map((e) => {
|
|
164
|
+
const t = l.tableColumn.find((o) => o.type === "select"), r = t && t.selectable && typeof t.selectable == "function" ? t.selectable(e) : !0;
|
|
165
|
+
return e.__ischildren ? g(_({}, e), { __index: E, rowcheck: !1, disabled: !r }) : g(_({}, e), { __index: E++, rowcheck: !1, disabled: !r });
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
let L = !1;
|
|
170
|
+
K(
|
|
171
|
+
() => l.pageNo,
|
|
172
|
+
() => {
|
|
173
|
+
L = !0;
|
|
174
|
+
}
|
|
175
|
+
), K(
|
|
176
|
+
() => p.value,
|
|
177
|
+
() => {
|
|
178
|
+
var e;
|
|
179
|
+
L && ((e = w.value) == null || e.scrollToItem(0)), L = !1;
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
const y = x({ prop: null, order: null }), P = (e, t) => {
|
|
183
|
+
y.value = y.value.prop === e && y.value.order === t ? { prop: null, order: null } : { prop: e, order: t }, S("sort-change", y.value);
|
|
184
|
+
}, ae = () => {
|
|
185
|
+
const e = (r, o) => {
|
|
186
|
+
const u = U(r, o);
|
|
187
|
+
return r.cellHeaderRender ? /* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-row-td"], R(r), "virtual-table-row-td custom", r.customClass], style: u }, typeof r.cellHeaderRender == "function" ? r.cellHeaderRender({
|
|
188
|
+
column: r,
|
|
189
|
+
columns: l.tableColumn,
|
|
190
|
+
columnIndex: o
|
|
191
|
+
}) : r.cellHeaderRender) : r.type === "number" ? /* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-row-td"], R(r), "virtual-table-row-td", r.customClass], style: u }, "序号") : r.type === "select" ? /* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-row-td"], R(r), "virtual-table-row-td", r.customClass], style: u }, /* @__PURE__ */ React.createElement(
|
|
192
|
+
Y,
|
|
193
|
+
{
|
|
194
|
+
indeterminate: v.value.length > 0 && v.value.length + H.value.length !== V.value.ml,
|
|
195
|
+
modelValue: I.value,
|
|
196
|
+
onChange: (a) => {
|
|
197
|
+
a ? v.value = p.value.filter((n) => !n.__ischildren).filter((n) => !(n != null && n.disabled)).map((n) => (n.rowcheck = !0, n)) : (v.value = [], p.value.forEach((n) => {
|
|
198
|
+
n.rowcheck = !1;
|
|
199
|
+
})), I.value = a === !0, te();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
)) : /* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-row-td"], R(r), "virtual-table-row-td", r.customClass], style: u }, r.title, r.sortable && /* @__PURE__ */ React.createElement("div", { class: [s["sort-wrapper"]] }, /* @__PURE__ */ React.createElement(
|
|
203
|
+
"i",
|
|
204
|
+
{
|
|
205
|
+
class: {
|
|
206
|
+
"sort-asc-active": y.value.prop === r.prop && y.value.order === "ascending"
|
|
207
|
+
},
|
|
208
|
+
onClick: () => P(r.prop, "ascending")
|
|
209
|
+
}
|
|
210
|
+
), /* @__PURE__ */ React.createElement(
|
|
211
|
+
"i",
|
|
212
|
+
{
|
|
213
|
+
class: {
|
|
214
|
+
"sort-desc-active": y.value.prop === r.prop && y.value.order === "descending"
|
|
215
|
+
},
|
|
216
|
+
onClick: () => P(r.prop, "descending")
|
|
217
|
+
}
|
|
218
|
+
)));
|
|
219
|
+
}, t = l.tableColumn.map((r, o) => e(r, o));
|
|
220
|
+
return /* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-header"], "virtual-table-header"] }, /* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-row-th"], "virtual-table-row-th"] }, t), l.headerSlotRender && l.headerSlotRender());
|
|
221
|
+
}, ne = ({ item: e, index: t, active: r }) => {
|
|
222
|
+
if (e.__ischildren === !0)
|
|
223
|
+
return /* @__PURE__ */ React.createElement(Z, { item: e, index: t, active: r, onClick: () => l.itemHandle(e, t) }, l.childrenRender && l.childrenRender(e));
|
|
224
|
+
const o = (a, n, W) => {
|
|
225
|
+
let C = 1, D = 1, i = null, c = null;
|
|
226
|
+
if (l.spanMethod) {
|
|
227
|
+
const { rowspan: F = 1, colspan: ue = 1, rowwidth: ie, colheight: de, _rowspan: j } = l.spanMethod({ row: e, column: a, rowIndex: n, columnIndex: W });
|
|
228
|
+
C = F, D = ue, i = ie || null, c = de || null, T.visibleStartIndex === n && j && j > 1 && (C = j);
|
|
229
|
+
}
|
|
230
|
+
const M = U(a, W, C, D, i, c);
|
|
231
|
+
if (!D)
|
|
232
|
+
return null;
|
|
233
|
+
if (!C)
|
|
234
|
+
return /* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-row-td"], R(a), "virtual-table-row-td", a.customClass], style: g(_({}, M), { borderBottom: "none" }) });
|
|
235
|
+
const O = C > 1 ? "virtual-table-priority-row-td" : "";
|
|
236
|
+
if (a.type === "number") {
|
|
237
|
+
const F = l.pageNo && l.pageSize ? (l.pageNo - 1) * l.pageSize + n + 1 : n + 1;
|
|
238
|
+
return /* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-row-td"], R(a), "virtual-table-row-td", O, a.customClass], style: M }, F);
|
|
239
|
+
}
|
|
240
|
+
if (a.type === "select")
|
|
241
|
+
return /* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-row-td"], R(a), "virtual-table-row-td", O, a.customClass], style: M }, /* @__PURE__ */ React.createElement("div", { class: "relative cursor-pointer" }, /* @__PURE__ */ React.createElement(Y, { modelValue: e.rowcheck, disabled: e.disabled }), /* @__PURE__ */ React.createElement("span", { class: "absolute left-0 right-0 top-0 bottom-0 z-[2]" })));
|
|
242
|
+
const se = () => {
|
|
243
|
+
if (a.cellRender)
|
|
244
|
+
try {
|
|
245
|
+
return a.cellRender(e, n, p.value);
|
|
246
|
+
} catch (F) {
|
|
247
|
+
return "";
|
|
248
|
+
}
|
|
249
|
+
return a.prop ? /* @__PURE__ */ React.createElement("span", { class: "px-[10px] py-[5px]", "data-column-index": W, "data-row-index": n }, e[a.prop]) : "";
|
|
250
|
+
};
|
|
251
|
+
return /* @__PURE__ */ React.createElement(
|
|
252
|
+
"div",
|
|
253
|
+
{
|
|
254
|
+
"data-column-index": W,
|
|
255
|
+
"data-row-index": n,
|
|
256
|
+
class: [s["virtual-table-row-td"], R(a), O, "virtual-table-row-td", a.customClass],
|
|
257
|
+
style: M
|
|
258
|
+
},
|
|
259
|
+
se()
|
|
260
|
+
);
|
|
261
|
+
}, u = l.tableColumn.map((a, n) => o(a, t, n));
|
|
262
|
+
return /* @__PURE__ */ React.createElement(
|
|
263
|
+
Z,
|
|
264
|
+
{
|
|
265
|
+
item: e,
|
|
266
|
+
index: t,
|
|
267
|
+
active: r,
|
|
268
|
+
onClick: () => {
|
|
269
|
+
l.itemHandle(e, t), e != null && e.disabled || (A(e[l.rowKey], !e.rowcheck), S("selection-change", z()));
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
/* @__PURE__ */ React.createElement(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
class: [s["virtual-table-row"], "virtual-table-row", "relative", typeof l.rowClassName == "string" ? l.rowClassName : l.rowClassName({ row: e, rowIndex: t })],
|
|
276
|
+
style: l.rowStyle({ row: e, rowIndex: t })
|
|
277
|
+
},
|
|
278
|
+
/* @__PURE__ */ React.createElement("div", { class: [s["virtual-table-row-tr"], "virtual-table-row-tr"] }, u),
|
|
279
|
+
l.expandSlotRender && /* @__PURE__ */ React.createElement("div", { style: { width: l.scroll ? ee() + "px" : "unset" }, class: [s["virtual-table-row-expand"], "virtual-table-row-expand"] }, l.expandSlotRender(e, t))
|
|
280
|
+
)
|
|
281
|
+
);
|
|
282
|
+
}, T = we({
|
|
283
|
+
startIndex: null,
|
|
284
|
+
endIndex: null,
|
|
285
|
+
visibleStartIndex: null,
|
|
286
|
+
visibleEndIndex: null
|
|
287
|
+
}), oe = Q(() => () => /* @__PURE__ */ React.createElement("div", { style: { position: "relative", background: "#fff" } }, /* @__PURE__ */ React.createElement(
|
|
288
|
+
Ee,
|
|
289
|
+
{
|
|
290
|
+
ref: w,
|
|
291
|
+
listClass: l.wrapClass,
|
|
292
|
+
keyField: l.rowKey,
|
|
293
|
+
itemClass: `${l.scroll ? s["scroll-item-class"] : ""} ${l.itemClass}`,
|
|
294
|
+
class: ["dynamic-scroller-ref", s["dynamic-scroller-ref"], l.border ? s.border : "", l.scroll ? s.scroll : ""],
|
|
295
|
+
items: p.value,
|
|
296
|
+
style: m.value,
|
|
297
|
+
minItemSize: l.minItemSize,
|
|
298
|
+
onScrollCapture: (e) => le(e),
|
|
299
|
+
emitUpdate: !!l.spanMethod,
|
|
300
|
+
onUpdate: (e, t, r, o) => {
|
|
301
|
+
T.startIndex = e, T.endIndex = t, T.visibleStartIndex = r, T.visibleEndIndex = o;
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
before: () => l.noHeader ? null : ae(),
|
|
306
|
+
default: ({ item: e, active: t }) => ne({ item: e, index: e.__index, active: t }),
|
|
307
|
+
empty: () => p.value.length ? /* @__PURE__ */ React.createElement("div", null) : l.emptySlotRender ? l.emptySlotRender() : /* @__PURE__ */ React.createElement(Se, { description: "数据为空" }),
|
|
308
|
+
after: () => l.afterSlotRender ? l.afterSlotRender() : null
|
|
309
|
+
}
|
|
310
|
+
), l.backTop && /* @__PURE__ */ React.createElement(ke, { target: ".dynamic-scroller-ref", right: 48, bottom: 112, onClick: () => ce() }))), ce = () => {
|
|
311
|
+
var e, t;
|
|
312
|
+
(e = w.value) == null || e.scrollToItem(0);
|
|
313
|
+
try {
|
|
314
|
+
const r = document.querySelector(".business-scroll>.el-scrollbar__wrap"), o = document.querySelector(".factory-scroll>.el-scrollbar__wrap");
|
|
315
|
+
(t = r || o) == null || t.scrollTo({ top: 0, behavior: "smooth" });
|
|
316
|
+
} catch (r) {
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
K(
|
|
320
|
+
() => l.defaultSort,
|
|
321
|
+
() => {
|
|
322
|
+
l.defaultSort && (y.value = l.defaultSort);
|
|
323
|
+
}
|
|
324
|
+
);
|
|
325
|
+
let E = 0;
|
|
326
|
+
ye(() => q(null, null, function* () {
|
|
327
|
+
l.defaultSort && (y.value = l.defaultSort), p.value = l.items.map((t) => {
|
|
328
|
+
const r = l.tableColumn.find((u) => u.type === "select"), o = r && r.selectable && typeof r.selectable == "function" ? r.selectable(t) : !0;
|
|
329
|
+
return t.__ischildren ? g(_({}, t), { __index: E, rowcheck: !1, disabled: !o }) : g(_({}, t), { __index: E++, rowcheck: !1, disabled: !o });
|
|
330
|
+
}), k.value = N().offsetWidth, new ResizeObserver(() => q(null, null, function* () {
|
|
331
|
+
yield me(), k.value = N().offsetWidth;
|
|
332
|
+
})).observe(N());
|
|
333
|
+
}));
|
|
334
|
+
const N = () => w.value ? w.value.$el : {};
|
|
335
|
+
return h({
|
|
336
|
+
clearSelection: re,
|
|
337
|
+
getSelection: z,
|
|
338
|
+
setSelection: A,
|
|
339
|
+
getScrollEl: N,
|
|
340
|
+
scrollToItem: (e) => {
|
|
341
|
+
e < 0 || e > p.value.length - 1 || w.value.scrollToItem(e);
|
|
342
|
+
}
|
|
343
|
+
}), (e, t) => {
|
|
344
|
+
const r = _e("horizontal-scroll");
|
|
345
|
+
return ge((xe(), Re(Ce(oe), null, null, 512)), [
|
|
346
|
+
[r, "VTable"]
|
|
347
|
+
]);
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
}), Ve = /* @__PURE__ */ Ie(ze, [["__scopeId", "data-v-ece81034"]]);
|
|
351
|
+
export {
|
|
352
|
+
Ve as V
|
|
353
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._dynamic-scroller-ref_k5pxi_1{border-top:1px solid #ebeef5;border-radius:8px}._dynamic-scroller-ref_k5pxi_1::-webkit-scrollbar{width:10px;height:10px}._dynamic-scroller-ref_k5pxi_1::-webkit-scrollbar-thumb{background:#8e8e8e}._dynamic-scroller-ref_k5pxi_1::-webkit-scrollbar-thumb:hover{background:#8e8e8e}._dynamic-scroller-ref_k5pxi_1._border_k5pxi_15{border-left:1px solid #ebeef5}._dynamic-scroller-ref_k5pxi_1._border_k5pxi_15 ._virtual-table-row-td_k5pxi_18{position:relative}._dynamic-scroller-ref_k5pxi_1._border_k5pxi_15 ._virtual-table-row-td_k5pxi_18:before,._dynamic-scroller-ref_k5pxi_1._border_k5pxi_15 ._virtual-table-row-td_k5pxi_18:after{position:absolute;top:0;bottom:0;width:1px;background:#ebeef5;content:""}._dynamic-scroller-ref_k5pxi_1._border_k5pxi_15 ._virtual-table-row-td_k5pxi_18:before{left:0;transform:translate(-1px)}._dynamic-scroller-ref_k5pxi_1._border_k5pxi_15 ._virtual-table-row-td_k5pxi_18:after{right:0;transform:translate(1px)}._dynamic-scroller-ref_k5pxi_1._scroll_k5pxi_37 ._virtual-table-header_k5pxi_37,._dynamic-scroller-ref_k5pxi_1._scroll_k5pxi_37 ._virtual-table-header_k5pxi_37 ._virtual-table-row-th_k5pxi_40{width:max-content}._dynamic-scroller-ref_k5pxi_1._scroll_k5pxi_37 ._virtual-table-row_k5pxi_18 ._virtual-table-row-tr_k5pxi_43{width:max-content;height:100%}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37{min-width:100%}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._virtual-table-row-th_k5pxi_40{position:relative;display:flex;min-width:100%;font-weight:500}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._virtual-table-row-th_k5pxi_40 ._virtual-table-row-td_k5pxi_18{display:flex;justify-content:center;align-items:center;padding:0 10px;min-height:33px;background:#e2e8f7;border-bottom:1px solid #ebeef5;word-break:break-all}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._virtual-table-row-th_k5pxi_40 ._virtual-table-row-td_k5pxi_18:first-child{border-top-left-radius:6px}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._virtual-table-row-th_k5pxi_40 ._virtual-table-row-td_k5pxi_18:last-child{border-top-right-radius:6px}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._virtual-table-row-th_k5pxi_40 ._virtual-table-row-td_k5pxi_18._shadow-right_k5pxi_72:before{position:absolute;top:0;bottom:-1px!important;left:-10px!important;overflow:hidden;width:10px!important;background:unset!important;box-shadow:inset -10px 0 10px -10px rgba(0,0,0,.15);content:"";touch-action:none;pointer-events:none}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._virtual-table-row-th_k5pxi_40 ._virtual-table-row-td_k5pxi_18._shadow-left_k5pxi_85:before{position:absolute;top:0;right:-10px!important;bottom:-1px!important;left:unset!important;overflow:hidden;width:10px!important;background:unset!important;box-shadow:inset 10px 0 10px -10px rgba(0,0,0,.15);content:"";touch-action:none;pointer-events:none}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._sort-wrapper_k5pxi_99{display:flex;flex-direction:column;margin-left:4px}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._sort-wrapper_k5pxi_99 i{width:8px;cursor:pointer}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._sort-wrapper_k5pxi_99 i:first-child{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #9198a8;margin-bottom:1px}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._sort-wrapper_k5pxi_99 i:first-child._active_k5pxi_114,._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._sort-wrapper_k5pxi_99 i:first-child._sort-asc-active_k5pxi_114{border-bottom-color:#000}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._sort-wrapper_k5pxi_99 i:last-child{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #9198a8;margin-top:1px}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._sort-wrapper_k5pxi_99 i:last-child._active_k5pxi_114,._dynamic-scroller-ref_k5pxi_1 ._virtual-table-header_k5pxi_37 ._sort-wrapper_k5pxi_99 i:last-child._sort-desc-active_k5pxi_123{border-top-color:#000}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-row_k5pxi_18{min-width:100%}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-row_k5pxi_18 ._virtual-table-row-tr_k5pxi_43{position:relative;display:flex;min-width:100%}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-row_k5pxi_18 ._virtual-table-row-tr_k5pxi_43 ._virtual-table-row-td_k5pxi_18{display:inline-flex;justify-content:center;align-items:center;border-bottom:1px solid #ebeef5;word-break:break-all;background-color:#fff}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-row_k5pxi_18 ._virtual-table-row-tr_k5pxi_43 ._virtual-table-row-td_k5pxi_18._shadow-right_k5pxi_72:before{position:absolute;top:0;bottom:-1px!important;left:-10px!important;overflow:hidden;width:10px!important;background:unset!important;box-shadow:inset -10px 0 10px -10px rgba(0,0,0,.15);content:"";touch-action:none;pointer-events:none}._dynamic-scroller-ref_k5pxi_1 ._virtual-table-row_k5pxi_18 ._virtual-table-row-tr_k5pxi_43 ._virtual-table-row-td_k5pxi_18._shadow-left_k5pxi_85:before{position:absolute;top:0;right:-10px!important;bottom:-1px!important;left:unset!important;overflow:hidden;width:10px!important;background:unset!important;box-shadow:inset 10px 0 10px -10px rgba(0,0,0,.15);content:"";touch-action:none;pointer-events:none}._scroll-item-class_k5pxi_170{width:auto!important}[data-v-ece81034] .vue-recycle-scroller__slot{position:sticky;top:0;z-index:10}[data-v-ece81034] .vue-recycle-scroller__item-wrapper{overflow:unset}[data-v-ece81034] .vue-recycle-scroller__item-wrapper .vue-recycle-scroller__item-view{min-width:100%}[data-v-ece81034] .vue-recycle-scroller__item-wrapper .vue-recycle-scroller__item-view:has(.virtual-table-priority-row-td){z-index:2}
|