asiaint-lowcode 3.0.18 → 3.0.20
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/dist/asiaint-lowcode.js +5 -5
- package/dist/asiaint-lowcode.umd.cjs +132 -132
- package/dist/index.d.ts +9 -81
- package/dist/lazy/{Card-BZBVb7aE.js → Card-Bne8hKf_.js} +1 -1
- package/dist/lazy/{Cascader-B4lz7iK6.js → Cascader-Dx2zWmTz.js} +1 -1
- package/dist/lazy/{Checkbox-Bynb0NT0.js → Checkbox-CA6KM4FC.js} +2 -2
- package/dist/lazy/{Collapse-G30hqmNm.js → Collapse-BJDKB5YO.js} +1 -1
- package/dist/lazy/{Component-CPdFFbsj.js → Component-CDr7HbSm.js} +1 -1
- package/dist/lazy/{Component-fNOhYdFv.js → Component-DqVp3K0h.js} +1 -1
- package/dist/lazy/{Component-B0hYH3vU.js → Component-DrhyApcI.js} +1 -1
- package/dist/lazy/{Component-CWNB0Jlu.js → Component-VTV1gteG.js} +1 -1
- package/dist/lazy/{Component-DPvjrsCR.js → Component-bLrPrFUd.js} +1 -1
- package/dist/lazy/{Component-BeSgMnB2.js → Component-eeXz6daT.js} +1 -1
- package/dist/lazy/CurdCard-C6gI7wmm.js +136 -0
- package/dist/lazy/{Custom-iAQ_31Jp.js → Custom-tlI13tso.js} +1 -1
- package/dist/lazy/{FormList-paORw3Fb.js → FormList-PEPeABIK.js} +1 -1
- package/dist/lazy/{Grid-CAcJjpEy.js → Grid-Dl1sitD5.js} +1 -1
- package/dist/lazy/{Inline-Dtx-csTe.js → Inline-5AXoh0Dy.js} +1 -1
- package/dist/lazy/{JsonEdit-CvdrWLHq.js → JsonEdit-CQhtFaMM.js} +1 -1
- package/dist/lazy/{ObjGroup-Cjz4SzvJ.js → ObjGroup-DHmVfpyI.js} +1 -1
- package/dist/lazy/{OfferDetails-BGoovbJm.js → OfferDetails-D27JKH31.js} +43 -43
- package/dist/lazy/{Radio-DKzZn31G.js → Radio-qZe3BPR2.js} +2 -2
- package/dist/lazy/{SearchSelect-B1YX-Ao2.js → SearchSelect-C1LoYowg.js} +2 -2
- package/dist/lazy/{Select-p4eyst_E.js → Select-DK8LYL5I.js} +2 -2
- package/dist/lazy/Table-C_05Yepo.js +294 -0
- package/dist/lazy/{Tabs-10OyFGmb.js → Tabs-C8RqJeA1.js} +1 -1
- package/dist/lazy/{Wrapper-DauMa47J.js → Wrapper-yuE53Dg_.js} +1 -1
- package/dist/lazy/{index-DMmaR_UH.js → index-GtzBrb0u.js} +6916 -6677
- package/dist/lazy/{useSelect-BsvU-jJC.js → useSelect-DHjiJUFb.js} +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/dist/lazy/CardList-DwWiAo9-.js +0 -108
- package/dist/lazy/CardListItem-yhIgxbTe.js +0 -85
- package/dist/lazy/CurdCard-B7bGNxEj.js +0 -107
- package/dist/lazy/Table-CuJVitWt.js +0 -279
package/package.json
CHANGED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, ref as y, inject as u, watchEffect as x, onMounted as z, resolveComponent as I, openBlock as r, createElementBlock as s, Fragment as g, createElementVNode as k, normalizeStyle as L, renderList as T, createVNode as C, toDisplayString as D, createCommentVNode as v, createBlock as E, withCtx as N } from "vue";
|
|
2
|
-
import { $, I as K, b as P } from "./index-DMmaR_UH.js";
|
|
3
|
-
import { C as V } from "./CardListItem-yhIgxbTe.js";
|
|
4
|
-
const j = /* @__PURE__ */ S({
|
|
5
|
-
__name: "CardList",
|
|
6
|
-
props: {
|
|
7
|
-
title: {},
|
|
8
|
-
key: {},
|
|
9
|
-
rulePath: {},
|
|
10
|
-
rowKey: {},
|
|
11
|
-
showDynamicSearch: { type: Boolean },
|
|
12
|
-
multipleSelection: { type: Boolean },
|
|
13
|
-
highlightCurrentRow: { type: Boolean },
|
|
14
|
-
"highlight-current-row": { type: Boolean },
|
|
15
|
-
stripe: { type: Boolean },
|
|
16
|
-
rowClick: {},
|
|
17
|
-
rowDbClick: {},
|
|
18
|
-
sizeChange: {},
|
|
19
|
-
pageChange: {},
|
|
20
|
-
topBtns: {},
|
|
21
|
-
rowBtns: {},
|
|
22
|
-
hidden: { type: Boolean },
|
|
23
|
-
hiddenPagination: { type: Boolean },
|
|
24
|
-
handleCurrentChange: {},
|
|
25
|
-
pageSizes: {},
|
|
26
|
-
defaultPageSize: {},
|
|
27
|
-
gridColumns: { default: 3 },
|
|
28
|
-
gap: { default: 16 },
|
|
29
|
-
footerText: {},
|
|
30
|
-
onClickFooter: {},
|
|
31
|
-
data: {},
|
|
32
|
-
columns: {}
|
|
33
|
-
},
|
|
34
|
-
setup(B) {
|
|
35
|
-
var f, h;
|
|
36
|
-
const t = B, a = y(), b = u("ruleModule", void 0), _ = u("pageMethodMap", {}), w = () => {
|
|
37
|
-
try {
|
|
38
|
-
b[t.onClickFooter](_, t.data);
|
|
39
|
-
} catch (e) {
|
|
40
|
-
console.error(e);
|
|
41
|
-
}
|
|
42
|
-
}, d = y([]), c = (f = t.columns.find((e) => e.position === "title")) == null ? void 0 : f.key, p = (h = t.columns.find((e) => e.position === "subTitle")) == null ? void 0 : h.key, i = t.columns.find((e) => e.position === "footer"), m = u($), n = m ? m.translateFn : null;
|
|
43
|
-
return x(() => {
|
|
44
|
-
t.data && (a.value = t.data.map((e) => {
|
|
45
|
-
const o = {
|
|
46
|
-
content: []
|
|
47
|
-
};
|
|
48
|
-
return c && (o.title = n ? n(c, e) : e[c]), p && (o.subTitle = n ? n(p, e) : e[p]), i && (o.footer = {
|
|
49
|
-
icon: i.footerIcon || "icon-tishi",
|
|
50
|
-
text: `${i.label}: ${n ? n(i.key, e) : e[i.key]}`
|
|
51
|
-
}), t.columns.forEach((l) => {
|
|
52
|
-
l.position === "content" && o.content.push({
|
|
53
|
-
label: l.label,
|
|
54
|
-
value: n ? n(l.key, e) : e[l.key]
|
|
55
|
-
});
|
|
56
|
-
}), o;
|
|
57
|
-
}));
|
|
58
|
-
}), z(() => {
|
|
59
|
-
var e;
|
|
60
|
-
d.value = (e = t.rowBtns) == null ? void 0 : e.map((o) => ({
|
|
61
|
-
icon: o.icon && o.icon.name ? o.icon.name : "icon-tishi",
|
|
62
|
-
label: o.label,
|
|
63
|
-
onClick: o.onClick
|
|
64
|
-
}));
|
|
65
|
-
}), (e, o) => {
|
|
66
|
-
const l = I("el-empty");
|
|
67
|
-
return r(), s(g, null, [
|
|
68
|
-
k("div", {
|
|
69
|
-
class: "card-list",
|
|
70
|
-
style: L({
|
|
71
|
-
"--columns": e.gridColumns,
|
|
72
|
-
"--gap": e.gap + "px"
|
|
73
|
-
})
|
|
74
|
-
}, [
|
|
75
|
-
(r(!0), s(g, null, T(a.value, (F, M) => (r(), s("div", {
|
|
76
|
-
class: "card-list-item",
|
|
77
|
-
key: M
|
|
78
|
-
}, [
|
|
79
|
-
C(V, {
|
|
80
|
-
data: F,
|
|
81
|
-
btns: d.value
|
|
82
|
-
}, null, 8, ["data", "btns"])
|
|
83
|
-
]))), 128))
|
|
84
|
-
], 4),
|
|
85
|
-
a.value && a.value.length > 0 ? (r(), s("div", {
|
|
86
|
-
key: 0,
|
|
87
|
-
class: "card-list-footer",
|
|
88
|
-
onClick: w
|
|
89
|
-
}, [
|
|
90
|
-
k("span", null, D(e.footerText), 1)
|
|
91
|
-
])) : v("", !0),
|
|
92
|
-
!a.value || a.value.length === 0 ? (r(), E(l, {
|
|
93
|
-
key: 1,
|
|
94
|
-
description: "No data available, please check",
|
|
95
|
-
"image-size": 56
|
|
96
|
-
}, {
|
|
97
|
-
image: N(() => [
|
|
98
|
-
C(K, { name: "icon-morentu" })
|
|
99
|
-
]),
|
|
100
|
-
_: 1
|
|
101
|
-
})) : v("", !0)
|
|
102
|
-
], 64);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}), G = /* @__PURE__ */ P(j, [["__scopeId", "data-v-0fa6dc1b"]]);
|
|
106
|
-
export {
|
|
107
|
-
G as default
|
|
108
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, inject as c, resolveComponent as M, openBlock as s, createElementBlock as a, createElementVNode as e, normalizeStyle as r, toDisplayString as l, createCommentVNode as d, Fragment as m, renderList as _, createVNode as i, withCtx as g } from "vue";
|
|
2
|
-
import { I as p, b as I } from "./index-DMmaR_UH.js";
|
|
3
|
-
const w = { class: "card-list-item" }, B = { class: "card-list-item-header" }, L = { class: "card-list-item-header-title" }, N = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "card-list-item-header-title__sub"
|
|
6
|
-
}, T = { class: "card-list-item-header-btns" }, V = ["onClick"], E = { class: "card-list-item-content" }, F = { class: "card-list-item-content-item-label" }, S = { class: "card-list-item-content-item-value" }, j = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "card-list-item-footer"
|
|
9
|
-
}, z = { class: "card-list-item-footer-text" }, D = /* @__PURE__ */ y({
|
|
10
|
-
__name: "CardListItem",
|
|
11
|
-
props: {
|
|
12
|
-
data: {},
|
|
13
|
-
btns: {}
|
|
14
|
-
},
|
|
15
|
-
setup(u) {
|
|
16
|
-
const h = u, v = c("ruleModule", void 0), b = c("pageMethodMap", {}), f = (t) => {
|
|
17
|
-
try {
|
|
18
|
-
v[t.onClick](b, h.data);
|
|
19
|
-
} catch (n) {
|
|
20
|
-
console.error(n);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
return (t, n) => {
|
|
24
|
-
const C = M("el-tooltip");
|
|
25
|
-
return s(), a("div", w, [
|
|
26
|
-
e("div", B, [
|
|
27
|
-
e("div", L, [
|
|
28
|
-
e("div", {
|
|
29
|
-
class: "card-list-item-header-title__text",
|
|
30
|
-
style: r({ color: t.data.titleColor })
|
|
31
|
-
}, l(t.data.title), 5),
|
|
32
|
-
t.data.subTitle ? (s(), a("div", N, [
|
|
33
|
-
e("span", {
|
|
34
|
-
class: "card-list-item-header-title__sub-icon",
|
|
35
|
-
style: r({ backgroundColor: t.data.subTitleColor })
|
|
36
|
-
}, null, 4),
|
|
37
|
-
e("span", null, l(t.data.subTitle), 1)
|
|
38
|
-
])) : d("", !0)
|
|
39
|
-
]),
|
|
40
|
-
e("div", T, [
|
|
41
|
-
(s(!0), a(m, null, _(t.btns, (o, k) => (s(), a("div", {
|
|
42
|
-
class: "card-list-item-header-btns-item",
|
|
43
|
-
key: k,
|
|
44
|
-
onClick: ($) => f(o)
|
|
45
|
-
}, [
|
|
46
|
-
i(C, {
|
|
47
|
-
class: "box-item",
|
|
48
|
-
effect: "dark",
|
|
49
|
-
content: o.label,
|
|
50
|
-
placement: "top",
|
|
51
|
-
"popper-class": "low-tsp",
|
|
52
|
-
"show-after": 300
|
|
53
|
-
}, {
|
|
54
|
-
default: g(() => [
|
|
55
|
-
i(p, {
|
|
56
|
-
name: o.icon
|
|
57
|
-
}, null, 8, ["name"])
|
|
58
|
-
]),
|
|
59
|
-
_: 2
|
|
60
|
-
}, 1032, ["content"])
|
|
61
|
-
], 8, V))), 128))
|
|
62
|
-
])
|
|
63
|
-
]),
|
|
64
|
-
e("div", E, [
|
|
65
|
-
(s(!0), a(m, null, _(t.data.content, (o) => (s(), a("div", {
|
|
66
|
-
class: "card-list-item-content-item",
|
|
67
|
-
key: o.label
|
|
68
|
-
}, [
|
|
69
|
-
e("div", F, l(o.label) + ":", 1),
|
|
70
|
-
e("div", S, l(o.value || "- -"), 1)
|
|
71
|
-
]))), 128))
|
|
72
|
-
]),
|
|
73
|
-
t.data.footer ? (s(), a("div", j, [
|
|
74
|
-
i(p, {
|
|
75
|
-
name: t.data.footer.icon
|
|
76
|
-
}, null, 8, ["name"]),
|
|
77
|
-
e("span", z, l(t.data.footer.text || "- -"), 1)
|
|
78
|
-
])) : d("", !0)
|
|
79
|
-
]);
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
}), G = /* @__PURE__ */ I(D, [["__scopeId", "data-v-7b912cd8"]]);
|
|
83
|
-
export {
|
|
84
|
-
G as C
|
|
85
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, inject as h, ref as w, resolveComponent as V, openBlock as o, createElementBlock as r, createElementVNode as a, normalizeClass as k, createBlock as t, createCommentVNode as v, toDisplayString as $, Fragment as f, renderList as z, withCtx as y, createVNode as i, unref as d, Transition as A, withDirectives as D, vShow as E } from "vue";
|
|
2
|
-
import { I as c, B as F, a as b, b as N } from "./index-DMmaR_UH.js";
|
|
3
|
-
import "element-plus";
|
|
4
|
-
const S = { class: "crm-curd-card" }, j = { class: "left-part" }, L = { class: "title" }, R = { class: "right-part" }, T = /* @__PURE__ */ M({
|
|
5
|
-
__name: "CurdCard",
|
|
6
|
-
props: {
|
|
7
|
-
children: {},
|
|
8
|
-
collapsible: { type: Boolean },
|
|
9
|
-
onCollapsed: {},
|
|
10
|
-
title: {},
|
|
11
|
-
btns: {},
|
|
12
|
-
type: {},
|
|
13
|
-
mainIcon: {},
|
|
14
|
-
extraIcons: {}
|
|
15
|
-
},
|
|
16
|
-
setup(_) {
|
|
17
|
-
const s = h("ruleModule", void 0), p = h("pageMethodMap", {}), m = (e) => {
|
|
18
|
-
if (e && s)
|
|
19
|
-
try {
|
|
20
|
-
s[e](p);
|
|
21
|
-
} catch (C) {
|
|
22
|
-
console.error(C);
|
|
23
|
-
}
|
|
24
|
-
}, I = () => {
|
|
25
|
-
n.value = !n.value, u.onCollapsed && s && s[u.onCollapsed](p, n.value);
|
|
26
|
-
}, n = w(!1), u = _;
|
|
27
|
-
return (e, C) => {
|
|
28
|
-
const g = V("el-tooltip");
|
|
29
|
-
return o(), r("div", S, [
|
|
30
|
-
a("div", {
|
|
31
|
-
class: k(["card-header", {
|
|
32
|
-
inline: e.type === "inline",
|
|
33
|
-
mix: e.type === "mix",
|
|
34
|
-
default: e.type === "default"
|
|
35
|
-
}])
|
|
36
|
-
}, [
|
|
37
|
-
a("div", j, [
|
|
38
|
-
e.mainIcon ? (o(), t(c, {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "title-icon",
|
|
41
|
-
size: "large",
|
|
42
|
-
name: e.mainIcon.name,
|
|
43
|
-
color: e.mainIcon.color
|
|
44
|
-
}, null, 8, ["name", "color"])) : v("", !0),
|
|
45
|
-
a("span", L, $(e.title), 1),
|
|
46
|
-
(o(!0), r(f, null, z(e.extraIcons, (l) => (o(), r(f, {
|
|
47
|
-
key: l.name
|
|
48
|
-
}, [
|
|
49
|
-
l.tips ? (o(), t(g, {
|
|
50
|
-
key: 0,
|
|
51
|
-
content: l.tips,
|
|
52
|
-
placement: "right"
|
|
53
|
-
}, {
|
|
54
|
-
default: y(() => [
|
|
55
|
-
i(c, {
|
|
56
|
-
class: "extra-icon",
|
|
57
|
-
name: l.name,
|
|
58
|
-
color: l.color,
|
|
59
|
-
onClick: (B) => m(l.onClick)
|
|
60
|
-
}, null, 8, ["name", "color", "onClick"])
|
|
61
|
-
]),
|
|
62
|
-
_: 2
|
|
63
|
-
}, 1032, ["content"])) : (o(), t(c, {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: "extra-icon",
|
|
66
|
-
name: l.name,
|
|
67
|
-
color: l.color,
|
|
68
|
-
onClick: (B) => m(l.onClick)
|
|
69
|
-
}, null, 8, ["name", "color", "onClick"]))
|
|
70
|
-
], 64))), 128))
|
|
71
|
-
]),
|
|
72
|
-
a("div", R, [
|
|
73
|
-
e.collapsible ? (o(), r("div", {
|
|
74
|
-
key: 0,
|
|
75
|
-
class: k(["collapse-icon-wrapper", { collapsed: n.value, mr16: Array.isArray(e.btns) && e.btns.length > 0 }]),
|
|
76
|
-
onClick: I
|
|
77
|
-
}, [
|
|
78
|
-
i(c, { name: "icon-shaixuan" })
|
|
79
|
-
], 2)) : v("", !0),
|
|
80
|
-
i(d(F), {
|
|
81
|
-
btns: e.btns || []
|
|
82
|
-
}, null, 8, ["btns"])
|
|
83
|
-
])
|
|
84
|
-
], 2),
|
|
85
|
-
e.onCollapsed ? (o(), t(d(b), {
|
|
86
|
-
key: 1,
|
|
87
|
-
list: e.children
|
|
88
|
-
}, null, 8, ["list"])) : (o(), t(A, {
|
|
89
|
-
key: 0,
|
|
90
|
-
name: "collapse"
|
|
91
|
-
}, {
|
|
92
|
-
default: y(() => [
|
|
93
|
-
D(a("div", null, [
|
|
94
|
-
i(d(b), { list: e.children }, null, 8, ["list"])
|
|
95
|
-
], 512), [
|
|
96
|
-
[E, !n.value]
|
|
97
|
-
])
|
|
98
|
-
]),
|
|
99
|
-
_: 1
|
|
100
|
-
}))
|
|
101
|
-
]);
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
}), J = /* @__PURE__ */ N(T, [["__scopeId", "data-v-4fc99b48"]]);
|
|
105
|
-
export {
|
|
106
|
-
J as default
|
|
107
|
-
};
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { defineComponent as pe, inject as _, ref as f, useTemplateRef as de, readonly as ge, toRefs as he, onUnmounted as fe, resolveComponent as R, openBlock as c, createElementBlock as k, createVNode as v, unref as p, withCtx as u, createElementVNode as w, createBlock as z, createCommentVNode as m, Fragment as b, renderList as E, toDisplayString as B, normalizeClass as V, createTextVNode as me } from "vue";
|
|
2
|
-
import { $ as ye, h as Ce, _ as ke, f as ve, I as we, b as ze } from "./index-DMmaR_UH.js";
|
|
3
|
-
import { ElTable as Se } from "element-plus";
|
|
4
|
-
const Re = { class: "empty-content" }, be = { class: "text-ellipsis" }, _e = { class: "text-ellipsis" }, Be = /* @__PURE__ */ pe({
|
|
5
|
-
__name: "Table",
|
|
6
|
-
props: {
|
|
7
|
-
title: {},
|
|
8
|
-
key: {},
|
|
9
|
-
rulePath: {},
|
|
10
|
-
rowKey: {},
|
|
11
|
-
showDynamicSearch: { type: Boolean },
|
|
12
|
-
multipleSelection: { type: Boolean },
|
|
13
|
-
highlightCurrentRow: { type: Boolean },
|
|
14
|
-
"highlight-current-row": { type: Boolean },
|
|
15
|
-
stripe: { type: Boolean },
|
|
16
|
-
rowClick: {},
|
|
17
|
-
rowDbClick: {},
|
|
18
|
-
sizeChange: {},
|
|
19
|
-
pageChange: {},
|
|
20
|
-
topBtns: {},
|
|
21
|
-
rowBtns: {},
|
|
22
|
-
columns: {},
|
|
23
|
-
hidden: { type: Boolean },
|
|
24
|
-
hiddenPagination: { type: Boolean },
|
|
25
|
-
handleCurrentChange: {},
|
|
26
|
-
pageSizes: {},
|
|
27
|
-
defaultPageSize: {},
|
|
28
|
-
name: {}
|
|
29
|
-
},
|
|
30
|
-
setup($, { expose: F }) {
|
|
31
|
-
const n = $, d = _("ruleModule", void 0), g = _("pageMethodMap", {}), N = _(ye), S = N ? N.translateFn : null, y = f(), U = (e, t, o) => {
|
|
32
|
-
s.value[e] && (s.value[e][t] = o);
|
|
33
|
-
}, j = (e, t) => {
|
|
34
|
-
const o = n.columns.find((l) => l.key === e);
|
|
35
|
-
o && (o.hidden = !t);
|
|
36
|
-
}, H = (e, t, o) => {
|
|
37
|
-
try {
|
|
38
|
-
d[e.onClick](g, t, o);
|
|
39
|
-
} catch (l) {
|
|
40
|
-
console.error(l);
|
|
41
|
-
}
|
|
42
|
-
}, K = (e) => {
|
|
43
|
-
if (n.rowClick)
|
|
44
|
-
try {
|
|
45
|
-
d[n.rowClick](g, e);
|
|
46
|
-
} catch (t) {
|
|
47
|
-
console.error(t);
|
|
48
|
-
}
|
|
49
|
-
}, x = (e) => {
|
|
50
|
-
if (n.rowDbClick)
|
|
51
|
-
try {
|
|
52
|
-
d[n.rowDbClick](g, e);
|
|
53
|
-
} catch (t) {
|
|
54
|
-
console.error(t);
|
|
55
|
-
}
|
|
56
|
-
}, A = f([]), L = (e) => {
|
|
57
|
-
A.value = e;
|
|
58
|
-
}, W = () => {
|
|
59
|
-
var e;
|
|
60
|
-
(e = y.value) == null || e.clearSelection();
|
|
61
|
-
}, q = () => s.value, P = f(), G = (e) => {
|
|
62
|
-
if (P.value = e, !!n.handleCurrentChange)
|
|
63
|
-
try {
|
|
64
|
-
d[n.handleCurrentChange](g, e);
|
|
65
|
-
} catch (t) {
|
|
66
|
-
console.error(t);
|
|
67
|
-
}
|
|
68
|
-
}, I = () => P.value, J = () => {
|
|
69
|
-
var e;
|
|
70
|
-
return (e = y.value) == null ? void 0 : e.getSelectionRows();
|
|
71
|
-
}, O = async () => !0, Q = (e, t) => {
|
|
72
|
-
var l;
|
|
73
|
-
const o = (l = n.topBtns) == null ? void 0 : l.find((C) => C.key === e);
|
|
74
|
-
o && (o.hidden = t);
|
|
75
|
-
}, X = (e, t) => {
|
|
76
|
-
var l;
|
|
77
|
-
const o = (l = n.rowBtns) == null ? void 0 : l.find((C) => C.key === e);
|
|
78
|
-
o && (o.condition = !t);
|
|
79
|
-
}, D = f(0), Y = (e) => {
|
|
80
|
-
D.value = e;
|
|
81
|
-
}, r = f({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), Z = () => r.value, ee = (e) => {
|
|
82
|
-
let t = !1;
|
|
83
|
-
return e.pageNum > -1 && (r.value.pageNum !== e.pageNum && (t = !0), r.value.pageNum = e.pageNum), e.pageSize > -1 && (r.value.pageSize !== e.pageSize && (t = !0), r.value.pageSize = e.pageSize), { pagination: r.value, isChange: t };
|
|
84
|
-
}, te = (e) => {
|
|
85
|
-
if (r.value.pageNum = 1, r.value.pageSize = e, !!n.sizeChange)
|
|
86
|
-
try {
|
|
87
|
-
d[n.sizeChange](g, r.value);
|
|
88
|
-
} catch (t) {
|
|
89
|
-
console.error(t);
|
|
90
|
-
}
|
|
91
|
-
}, ne = (e) => {
|
|
92
|
-
if (r.value.pageNum = e, !!n.pageChange)
|
|
93
|
-
try {
|
|
94
|
-
d[n.pageChange](g, r.value);
|
|
95
|
-
} catch (t) {
|
|
96
|
-
console.error(t);
|
|
97
|
-
}
|
|
98
|
-
}, oe = (e) => {
|
|
99
|
-
var t;
|
|
100
|
-
(t = y.value) == null || t.setCurrentRow(e);
|
|
101
|
-
}, ae = (e) => {
|
|
102
|
-
var t;
|
|
103
|
-
(t = y.value) == null || t.setCurrentRow(s.value[e]);
|
|
104
|
-
}, le = (e, t, o) => {
|
|
105
|
-
n.columns.forEach((l) => {
|
|
106
|
-
l.key === e && l[t] && (l[t] = o);
|
|
107
|
-
});
|
|
108
|
-
}, s = f([]), re = (e) => {
|
|
109
|
-
s.value = e;
|
|
110
|
-
}, ie = (e = {}) => {
|
|
111
|
-
s.value.push(e);
|
|
112
|
-
}, se = (e) => {
|
|
113
|
-
e >= 0 && e < s.value.length && s.value.splice(e, 1);
|
|
114
|
-
}, ce = async () => {
|
|
115
|
-
s.value = [...s.value];
|
|
116
|
-
}, T = de("rootRef"), M = ge({
|
|
117
|
-
...he(n),
|
|
118
|
-
setCellData: U,
|
|
119
|
-
clearSelection: W,
|
|
120
|
-
getData: q,
|
|
121
|
-
getCurrentRow: I,
|
|
122
|
-
getSelectedRows: J,
|
|
123
|
-
addRow: ie,
|
|
124
|
-
deleteRow: se,
|
|
125
|
-
refresh: ce,
|
|
126
|
-
validate: O,
|
|
127
|
-
setData: re,
|
|
128
|
-
selectRow: oe,
|
|
129
|
-
selectRowNum: ae,
|
|
130
|
-
setTotal: Y,
|
|
131
|
-
getPagination: Z,
|
|
132
|
-
setPagination: ee,
|
|
133
|
-
setTopBtnHidden: Q,
|
|
134
|
-
setColVisible: j,
|
|
135
|
-
setColumn: le,
|
|
136
|
-
setRowsBtnHidden: X,
|
|
137
|
-
rootRef: T,
|
|
138
|
-
type: "table"
|
|
139
|
-
});
|
|
140
|
-
if (n.name) {
|
|
141
|
-
const e = Ce(n.name, M);
|
|
142
|
-
fe(() => {
|
|
143
|
-
e();
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
return F(M), (e, t) => {
|
|
147
|
-
const o = R("el-table-column"), l = R("el-tooltip"), C = R("el-button"), ue = R("el-pagination");
|
|
148
|
-
return e.hidden ? m("", !0) : (c(), k("div", {
|
|
149
|
-
key: 0,
|
|
150
|
-
class: "table-render",
|
|
151
|
-
ref_key: "rootRef",
|
|
152
|
-
ref: T
|
|
153
|
-
}, [
|
|
154
|
-
v(p(Se), {
|
|
155
|
-
ref_key: "tableRef",
|
|
156
|
-
ref: y,
|
|
157
|
-
data: s.value,
|
|
158
|
-
"highlight-current-row": e.highlightCurrentRow,
|
|
159
|
-
"row-key": e.rowKey,
|
|
160
|
-
stripe: e.stripe,
|
|
161
|
-
onRowClick: K,
|
|
162
|
-
onRowDblclick: x,
|
|
163
|
-
onSelectionChange: L,
|
|
164
|
-
onCurrentChange: G
|
|
165
|
-
}, {
|
|
166
|
-
empty: u(() => [
|
|
167
|
-
w("div", Re, [
|
|
168
|
-
v(p(ke), {
|
|
169
|
-
name: "tableEmpty",
|
|
170
|
-
style: { width: 56, height: 56 }
|
|
171
|
-
}),
|
|
172
|
-
t[2] || (t[2] = w("div", null, "No data available,please check", -1))
|
|
173
|
-
])
|
|
174
|
-
]),
|
|
175
|
-
default: u(() => [
|
|
176
|
-
e.multipleSelection ? (c(), z(o, {
|
|
177
|
-
key: 0,
|
|
178
|
-
type: "selection",
|
|
179
|
-
width: "55"
|
|
180
|
-
})) : m("", !0),
|
|
181
|
-
(c(!0), k(b, null, E(e.columns, (a) => (c(), k(b, {
|
|
182
|
-
key: a.key
|
|
183
|
-
}, [
|
|
184
|
-
a.hidden ? m("", !0) : (c(), z(o, {
|
|
185
|
-
key: 0,
|
|
186
|
-
prop: a.key,
|
|
187
|
-
"min-width": a.minWidth,
|
|
188
|
-
fixed: a.fixed || !1
|
|
189
|
-
}, {
|
|
190
|
-
header: u(() => [
|
|
191
|
-
v(l, {
|
|
192
|
-
class: "box-item",
|
|
193
|
-
effect: "dark",
|
|
194
|
-
content: a.label,
|
|
195
|
-
"show-after": 300,
|
|
196
|
-
placement: "top"
|
|
197
|
-
}, {
|
|
198
|
-
default: u(() => [
|
|
199
|
-
w("div", be, B(a.label), 1)
|
|
200
|
-
]),
|
|
201
|
-
_: 2
|
|
202
|
-
}, 1032, ["content"])
|
|
203
|
-
]),
|
|
204
|
-
default: u(({ row: h }) => [
|
|
205
|
-
v(l, {
|
|
206
|
-
class: "box-item",
|
|
207
|
-
effect: "dark",
|
|
208
|
-
content: p(S) ? p(S)(a.key, h) : h[a.key],
|
|
209
|
-
"show-after": 300,
|
|
210
|
-
placement: "top"
|
|
211
|
-
}, {
|
|
212
|
-
default: u(() => [
|
|
213
|
-
w("div", _e, B(p(S) ? p(S)(a.key, h) : h[a.key]), 1)
|
|
214
|
-
]),
|
|
215
|
-
_: 2
|
|
216
|
-
}, 1032, ["content"])
|
|
217
|
-
]),
|
|
218
|
-
_: 2
|
|
219
|
-
}, 1032, ["prop", "min-width", "fixed"]))
|
|
220
|
-
], 64))), 128)),
|
|
221
|
-
e.rowBtns && e.rowBtns.length > 0 ? (c(), z(o, {
|
|
222
|
-
key: 1,
|
|
223
|
-
label: "Action",
|
|
224
|
-
fixed: "right",
|
|
225
|
-
align: "left"
|
|
226
|
-
}, {
|
|
227
|
-
default: u(({ row: a, $index: h }) => [
|
|
228
|
-
(c(!0), k(b, null, E(e.rowBtns, (i) => (c(), k(b, {
|
|
229
|
-
key: i.key
|
|
230
|
-
}, [
|
|
231
|
-
i.condition === void 0 || i.condition === null || p(ve)(i.condition, { $row: a }) ? (c(), z(C, {
|
|
232
|
-
key: 0,
|
|
233
|
-
disabled: i.disabled,
|
|
234
|
-
size: "small",
|
|
235
|
-
type: i.type,
|
|
236
|
-
onClick: (Ne) => H(i, a, h)
|
|
237
|
-
}, {
|
|
238
|
-
default: u(() => [
|
|
239
|
-
i.icon ? (c(), z(we, {
|
|
240
|
-
key: 0,
|
|
241
|
-
name: i.icon.name,
|
|
242
|
-
color: i.icon.color,
|
|
243
|
-
class: V({ "btn-icon": i.text || i.label })
|
|
244
|
-
}, null, 8, ["name", "color", "class"])) : m("", !0),
|
|
245
|
-
me(" " + B(i.label), 1)
|
|
246
|
-
]),
|
|
247
|
-
_: 2
|
|
248
|
-
}, 1032, ["disabled", "type", "onClick"])) : m("", !0)
|
|
249
|
-
], 64))), 128))
|
|
250
|
-
]),
|
|
251
|
-
_: 1
|
|
252
|
-
})) : m("", !0)
|
|
253
|
-
]),
|
|
254
|
-
_: 1
|
|
255
|
-
}, 8, ["data", "highlight-current-row", "row-key", "stripe"]),
|
|
256
|
-
w("div", {
|
|
257
|
-
class: V(["pagination-wrapper", { hidePagination: e.hiddenPagination }])
|
|
258
|
-
}, [
|
|
259
|
-
v(ue, {
|
|
260
|
-
background: "",
|
|
261
|
-
layout: "total,sizes, prev, pager, next,jumper",
|
|
262
|
-
total: D.value,
|
|
263
|
-
"page-sizes": e.pageSizes || [5, 10, 20, 30, 40],
|
|
264
|
-
"default-page-size": e.defaultPageSize,
|
|
265
|
-
"current-page": r.value.pageNum,
|
|
266
|
-
"onUpdate:currentPage": t[0] || (t[0] = (a) => r.value.pageNum = a),
|
|
267
|
-
"page-size": r.value.pageSize,
|
|
268
|
-
"onUpdate:pageSize": t[1] || (t[1] = (a) => r.value.pageSize = a),
|
|
269
|
-
onSizeChange: te,
|
|
270
|
-
onCurrentChange: ne
|
|
271
|
-
}, null, 8, ["total", "page-sizes", "default-page-size", "current-page", "page-size"])
|
|
272
|
-
], 2)
|
|
273
|
-
], 512));
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
}), Me = /* @__PURE__ */ ze(Be, [["__scopeId", "data-v-7b1b78e9"]]);
|
|
277
|
-
export {
|
|
278
|
-
Me as default
|
|
279
|
-
};
|