asiaint-lowcode 3.0.17 → 3.0.19
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 +129 -129
- package/dist/index.d.ts +11 -81
- package/dist/lazy/Card-C0svyzWN.js +92 -0
- package/dist/lazy/{Cascader-CYH5Fi7i.js → Cascader-h0uYEaTX.js} +1 -1
- package/dist/lazy/{Checkbox-D53Paz5b.js → Checkbox-BT1pOO9x.js} +2 -2
- package/dist/lazy/{Collapse-Cmx5or4b.js → Collapse-DaskcZsh.js} +1 -1
- package/dist/lazy/{Component-DF8iAcIj.js → Component-BieMFR_R.js} +1 -1
- package/dist/lazy/{Component-CGdDOPOy.js → Component-C1PK1e1O.js} +1 -1
- package/dist/lazy/{Component-gsuTGjd3.js → Component-CJm4wK8L.js} +1 -1
- package/dist/lazy/{Component-D0dwgR6z.js → Component-CU5Vt5h_.js} +11 -11
- package/dist/lazy/{Component-CU23NOb2.js → Component-CfJuhpMD.js} +1 -1
- package/dist/lazy/{Component-Cj1LHwcP.js → Component-Db_jMv7Z.js} +1 -1
- package/dist/lazy/CurdCard-Bahfe6Nn.js +136 -0
- package/dist/lazy/{Custom-_TKg63Y-.js → Custom-CsypsOGf.js} +1 -1
- package/dist/lazy/{FormList-BpRr23C5.js → FormList-CxxcaDK2.js} +1 -1
- package/dist/lazy/{Grid-uJbOswN2.js → Grid-CUBLaDE3.js} +1 -1
- package/dist/lazy/{Inline-JPrJPoID.js → Inline-zKXaEqwJ.js} +1 -1
- package/dist/lazy/{JsonEdit-BZR2tMmu.js → JsonEdit-p2Pd0nJU.js} +1 -1
- package/dist/lazy/{ObjGroup-BFLXonc_.js → ObjGroup-CVJTWWxL.js} +1 -1
- package/dist/lazy/{OfferDetails-wBzkM5UY.js → OfferDetails-CZqb_xlB.js} +43 -43
- package/dist/lazy/{Radio-DY3h8hvk.js → Radio-BD6Irvdg.js} +2 -2
- package/dist/lazy/{SearchSelect-BA6DwHFz.js → SearchSelect-DmazBOwK.js} +2 -2
- package/dist/lazy/{Select-B5xgS3RP.js → Select-CoOQpaeQ.js} +2 -2
- package/dist/lazy/Table-DNsWnP_g.js +294 -0
- package/dist/lazy/{Tabs-DvbrjYdV.js → Tabs-Dx0cy5Ll.js} +1 -1
- package/dist/lazy/{Wrapper-DOKiemVa.js → Wrapper-Cs9R2uf3.js} +1 -1
- package/dist/lazy/{index-KOkHm1wc.js → index-txSDEbhu.js} +6988 -6724
- package/dist/lazy/{useSelect-DnnrbcQO.js → useSelect-DHP6UE_X.js} +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/dist/lazy/Card-C5_msSt_.js +0 -59
- package/dist/lazy/CardList-MgVKIygB.js +0 -108
- package/dist/lazy/CardListItem-CKntC7cg.js +0 -85
- package/dist/lazy/CurdCard-B837mmwu.js +0 -108
- package/dist/lazy/Table-lhInsLy-.js +0 -280
package/package.json
CHANGED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, ref as i, resolveComponent as p, openBlock as t, createBlock as m, mergeProps as u, withCtx as o, createElementVNode as s, createElementBlock as _, createVNode as l, unref as n, normalizeClass as v, createCommentVNode as f, toDisplayString as h, Transition as C, withDirectives as b, vShow as w } from "vue";
|
|
2
|
-
import { _ as B, B as k, a as E, b as $ } from "./index-KOkHm1wc.js";
|
|
3
|
-
import "element-plus";
|
|
4
|
-
const y = { class: "card-header" }, N = { class: "card-btns" }, V = /* @__PURE__ */ d({
|
|
5
|
-
__name: "Card",
|
|
6
|
-
props: {
|
|
7
|
-
children: {},
|
|
8
|
-
collapsible: { type: Boolean },
|
|
9
|
-
header: {},
|
|
10
|
-
btns: {}
|
|
11
|
-
},
|
|
12
|
-
setup(g) {
|
|
13
|
-
const e = i(!1);
|
|
14
|
-
return (a, r) => {
|
|
15
|
-
const c = p("ElCard");
|
|
16
|
-
return t(), m(c, u(a.$attrs, {
|
|
17
|
-
class: ["crm-card", { collapsed: e.value }],
|
|
18
|
-
shadow: "never"
|
|
19
|
-
}), {
|
|
20
|
-
header: o(() => [
|
|
21
|
-
s("div", y, [
|
|
22
|
-
a.collapsible ? (t(), _("div", {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "icon-wrapper",
|
|
25
|
-
onClick: r[0] || (r[0] = (D) => e.value = !e.value)
|
|
26
|
-
}, [
|
|
27
|
-
l(n(B), {
|
|
28
|
-
name: "dropdown",
|
|
29
|
-
class: v(["dropdown-icon", { "is-collapsed": e.value }])
|
|
30
|
-
}, null, 8, ["class"])
|
|
31
|
-
])) : f("", !0),
|
|
32
|
-
s("span", null, h(a.header), 1),
|
|
33
|
-
s("div", N, [
|
|
34
|
-
l(n(k), {
|
|
35
|
-
btns: a.btns || []
|
|
36
|
-
}, null, 8, ["btns"])
|
|
37
|
-
])
|
|
38
|
-
])
|
|
39
|
-
]),
|
|
40
|
-
default: o(() => [
|
|
41
|
-
l(C, { name: "collapse" }, {
|
|
42
|
-
default: o(() => [
|
|
43
|
-
b(s("div", null, [
|
|
44
|
-
l(n(E), { list: a.children }, null, 8, ["list"])
|
|
45
|
-
], 512), [
|
|
46
|
-
[w, !e.value]
|
|
47
|
-
])
|
|
48
|
-
]),
|
|
49
|
-
_: 1
|
|
50
|
-
})
|
|
51
|
-
]),
|
|
52
|
-
_: 1
|
|
53
|
-
}, 16, ["class"]);
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
}), P = /* @__PURE__ */ $(V, [["__scopeId", "data-v-a2ac1e9f"]]);
|
|
57
|
-
export {
|
|
58
|
-
P as default
|
|
59
|
-
};
|
|
@@ -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-KOkHm1wc.js";
|
|
3
|
-
import { C as V } from "./CardListItem-CKntC7cg.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-KOkHm1wc.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,108 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, inject as C, ref as w, resolveComponent as V, openBlock as o, createElementBlock as s, createElementVNode as n, normalizeClass as h, createBlock as a, createCommentVNode as f, toDisplayString as $, Fragment as k, renderList as z, withCtx as v, createVNode as r, unref as d, Transition as A, withDirectives as D, vShow as E } from "vue";
|
|
2
|
-
import { I as i, B as F, a as y, b as N } from "./index-KOkHm1wc.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(b) {
|
|
17
|
-
const p = C("ruleModule", void 0), _ = C("pageMethodMap", {}), c = (e) => {
|
|
18
|
-
if (e && p)
|
|
19
|
-
try {
|
|
20
|
-
p[e](_);
|
|
21
|
-
} catch (u) {
|
|
22
|
-
console.error(u);
|
|
23
|
-
}
|
|
24
|
-
}, I = () => {
|
|
25
|
-
m.onCollapsed && c(m.onCollapsed), t.value = !t.value;
|
|
26
|
-
}, t = w(!1), m = b;
|
|
27
|
-
return (e, u) => {
|
|
28
|
-
const g = V("el-tooltip");
|
|
29
|
-
return o(), s("div", S, [
|
|
30
|
-
n("div", {
|
|
31
|
-
class: h(["card-header", {
|
|
32
|
-
inline: e.type === "inline",
|
|
33
|
-
mix: e.type === "mix",
|
|
34
|
-
default: e.type === "default"
|
|
35
|
-
}])
|
|
36
|
-
}, [
|
|
37
|
-
n("div", j, [
|
|
38
|
-
e.mainIcon ? (o(), a(i, {
|
|
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"])) : f("", !0),
|
|
45
|
-
n("span", L, $(e.title), 1),
|
|
46
|
-
(o(!0), s(k, null, z(e.extraIcons, (l) => (o(), s(k, {
|
|
47
|
-
key: l.name
|
|
48
|
-
}, [
|
|
49
|
-
l.tips ? (o(), a(g, {
|
|
50
|
-
key: 0,
|
|
51
|
-
content: l.tips,
|
|
52
|
-
placement: "right",
|
|
53
|
-
class: "low-tsp"
|
|
54
|
-
}, {
|
|
55
|
-
default: v(() => [
|
|
56
|
-
r(i, {
|
|
57
|
-
class: "extra-icon",
|
|
58
|
-
name: l.name,
|
|
59
|
-
color: l.color,
|
|
60
|
-
onClick: (B) => c(l.onClick)
|
|
61
|
-
}, null, 8, ["name", "color", "onClick"])
|
|
62
|
-
]),
|
|
63
|
-
_: 2
|
|
64
|
-
}, 1032, ["content"])) : (o(), a(i, {
|
|
65
|
-
key: 1,
|
|
66
|
-
class: "extra-icon",
|
|
67
|
-
name: l.name,
|
|
68
|
-
color: l.color,
|
|
69
|
-
onClick: (B) => c(l.onClick)
|
|
70
|
-
}, null, 8, ["name", "color", "onClick"]))
|
|
71
|
-
], 64))), 128))
|
|
72
|
-
]),
|
|
73
|
-
n("div", R, [
|
|
74
|
-
e.collapsible ? (o(), s("div", {
|
|
75
|
-
key: 0,
|
|
76
|
-
class: h(["collapse-icon-wrapper", { collapsed: t.value, mr16: Array.isArray(e.btns) && e.btns.length > 0 }]),
|
|
77
|
-
onClick: I
|
|
78
|
-
}, [
|
|
79
|
-
r(i, { name: "icon-shaixuan" })
|
|
80
|
-
], 2)) : f("", !0),
|
|
81
|
-
r(d(F), {
|
|
82
|
-
btns: e.btns || []
|
|
83
|
-
}, null, 8, ["btns"])
|
|
84
|
-
])
|
|
85
|
-
], 2),
|
|
86
|
-
e.onCollapsed ? (o(), a(d(y), {
|
|
87
|
-
key: 1,
|
|
88
|
-
list: e.children
|
|
89
|
-
}, null, 8, ["list"])) : (o(), a(A, {
|
|
90
|
-
key: 0,
|
|
91
|
-
name: "collapse"
|
|
92
|
-
}, {
|
|
93
|
-
default: v(() => [
|
|
94
|
-
D(n("div", null, [
|
|
95
|
-
r(d(y), { list: e.children }, null, 8, ["list"])
|
|
96
|
-
], 512), [
|
|
97
|
-
[E, !t.value]
|
|
98
|
-
])
|
|
99
|
-
]),
|
|
100
|
-
_: 1
|
|
101
|
-
}))
|
|
102
|
-
]);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}), J = /* @__PURE__ */ N(T, [["__scopeId", "data-v-ff874b5a"]]);
|
|
106
|
-
export {
|
|
107
|
-
J as default
|
|
108
|
-
};
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ue, inject as B, ref as m, useTemplateRef as pe, readonly as de, toRefs as ge, onUnmounted as he, resolveComponent as S, openBlock as c, createElementBlock as y, createVNode as v, unref as p, withCtx as u, createElementVNode as R, createBlock as w, createCommentVNode as d, Fragment as _, renderList as E, toDisplayString as N, normalizeClass as fe, 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-KOkHm1wc.js";
|
|
3
|
-
import { ElTable as Se } from "element-plus";
|
|
4
|
-
const Re = { class: "empty-content" }, _e = { class: "text-ellipsis" }, be = { class: "text-ellipsis" }, Be = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "pagination-wrapper"
|
|
7
|
-
}, Ne = /* @__PURE__ */ ue({
|
|
8
|
-
__name: "Table",
|
|
9
|
-
props: {
|
|
10
|
-
title: {},
|
|
11
|
-
key: {},
|
|
12
|
-
rulePath: {},
|
|
13
|
-
rowKey: {},
|
|
14
|
-
showDynamicSearch: { type: Boolean },
|
|
15
|
-
multipleSelection: { type: Boolean },
|
|
16
|
-
highlightCurrentRow: { type: Boolean },
|
|
17
|
-
"highlight-current-row": { type: Boolean },
|
|
18
|
-
stripe: { type: Boolean },
|
|
19
|
-
rowClick: {},
|
|
20
|
-
rowDbClick: {},
|
|
21
|
-
sizeChange: {},
|
|
22
|
-
pageChange: {},
|
|
23
|
-
topBtns: {},
|
|
24
|
-
rowBtns: {},
|
|
25
|
-
columns: {},
|
|
26
|
-
hidden: { type: Boolean },
|
|
27
|
-
hiddenPagination: { type: Boolean },
|
|
28
|
-
handleCurrentChange: {},
|
|
29
|
-
pageSizes: {},
|
|
30
|
-
defaultPageSize: {},
|
|
31
|
-
name: {}
|
|
32
|
-
},
|
|
33
|
-
setup(V, { expose: $ }) {
|
|
34
|
-
const n = V, g = B("ruleModule", void 0), h = B("pageMethodMap", {}), D = B(ye), z = D ? D.translateFn : null, C = m(), F = (e, t, o) => {
|
|
35
|
-
s.value[e] && (s.value[e][t] = o);
|
|
36
|
-
}, U = (e, t) => {
|
|
37
|
-
const o = n.columns.find((l) => l.key === e);
|
|
38
|
-
o && (o.hidden = !t);
|
|
39
|
-
}, j = (e, t, o) => {
|
|
40
|
-
try {
|
|
41
|
-
g[e.onClick](h, t, o);
|
|
42
|
-
} catch (l) {
|
|
43
|
-
console.error(l);
|
|
44
|
-
}
|
|
45
|
-
}, H = (e) => {
|
|
46
|
-
if (n.rowClick)
|
|
47
|
-
try {
|
|
48
|
-
g[n.rowClick](h, e);
|
|
49
|
-
} catch (t) {
|
|
50
|
-
console.error(t);
|
|
51
|
-
}
|
|
52
|
-
}, K = (e) => {
|
|
53
|
-
if (n.rowDbClick)
|
|
54
|
-
try {
|
|
55
|
-
g[n.rowDbClick](h, e);
|
|
56
|
-
} catch (t) {
|
|
57
|
-
console.error(t);
|
|
58
|
-
}
|
|
59
|
-
}, x = m([]), A = (e) => {
|
|
60
|
-
x.value = e;
|
|
61
|
-
}, L = () => {
|
|
62
|
-
var e;
|
|
63
|
-
(e = C.value) == null || e.clearSelection();
|
|
64
|
-
}, W = () => s.value, P = m(), q = (e) => {
|
|
65
|
-
if (P.value = e, !!n.handleCurrentChange)
|
|
66
|
-
try {
|
|
67
|
-
g[n.handleCurrentChange](h, e);
|
|
68
|
-
} catch (t) {
|
|
69
|
-
console.error(t);
|
|
70
|
-
}
|
|
71
|
-
}, G = () => P.value, I = () => {
|
|
72
|
-
var e;
|
|
73
|
-
return (e = C.value) == null ? void 0 : e.getSelectionRows();
|
|
74
|
-
}, J = async () => !0, O = (e, t) => {
|
|
75
|
-
var l;
|
|
76
|
-
const o = (l = n.topBtns) == null ? void 0 : l.find((k) => k.key === e);
|
|
77
|
-
o && (o.hidden = t);
|
|
78
|
-
}, Q = (e, t) => {
|
|
79
|
-
var l;
|
|
80
|
-
const o = (l = n.rowBtns) == null ? void 0 : l.find((k) => k.key === e);
|
|
81
|
-
o && (o.condition = !t);
|
|
82
|
-
}, b = m(0), X = (e) => {
|
|
83
|
-
b.value = e;
|
|
84
|
-
}, r = m({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), Y = () => r.value, Z = (e) => {
|
|
85
|
-
let t = !1;
|
|
86
|
-
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 };
|
|
87
|
-
}, ee = (e) => {
|
|
88
|
-
if (r.value.pageNum = 1, r.value.pageSize = e, !!n.sizeChange)
|
|
89
|
-
try {
|
|
90
|
-
g[n.sizeChange](h, r.value);
|
|
91
|
-
} catch (t) {
|
|
92
|
-
console.error(t);
|
|
93
|
-
}
|
|
94
|
-
}, te = (e) => {
|
|
95
|
-
if (r.value.pageNum = e, !!n.pageChange)
|
|
96
|
-
try {
|
|
97
|
-
g[n.pageChange](h, r.value);
|
|
98
|
-
} catch (t) {
|
|
99
|
-
console.error(t);
|
|
100
|
-
}
|
|
101
|
-
}, ne = (e) => {
|
|
102
|
-
var t;
|
|
103
|
-
(t = C.value) == null || t.setCurrentRow(e);
|
|
104
|
-
}, oe = (e) => {
|
|
105
|
-
var t;
|
|
106
|
-
(t = C.value) == null || t.setCurrentRow(s.value[e]);
|
|
107
|
-
}, ae = (e, t, o) => {
|
|
108
|
-
n.columns.forEach((l) => {
|
|
109
|
-
l.key === e && l[t] && (l[t] = o);
|
|
110
|
-
});
|
|
111
|
-
}, s = m([]), le = (e) => {
|
|
112
|
-
s.value = e;
|
|
113
|
-
}, re = (e = {}) => {
|
|
114
|
-
s.value.push(e);
|
|
115
|
-
}, ie = (e) => {
|
|
116
|
-
e >= 0 && e < s.value.length && s.value.splice(e, 1);
|
|
117
|
-
}, se = async () => {
|
|
118
|
-
s.value = [...s.value];
|
|
119
|
-
}, T = pe("rootRef"), M = de({
|
|
120
|
-
...ge(n),
|
|
121
|
-
setCellData: F,
|
|
122
|
-
clearSelection: L,
|
|
123
|
-
getData: W,
|
|
124
|
-
getCurrentRow: G,
|
|
125
|
-
getSelectedRows: I,
|
|
126
|
-
addRow: re,
|
|
127
|
-
deleteRow: ie,
|
|
128
|
-
refresh: se,
|
|
129
|
-
validate: J,
|
|
130
|
-
setData: le,
|
|
131
|
-
selectRow: ne,
|
|
132
|
-
selectRowNum: oe,
|
|
133
|
-
setTotal: X,
|
|
134
|
-
getPagination: Y,
|
|
135
|
-
setPagination: Z,
|
|
136
|
-
setTopBtnHidden: O,
|
|
137
|
-
setColVisible: U,
|
|
138
|
-
setColumn: ae,
|
|
139
|
-
setRowsBtnHidden: Q,
|
|
140
|
-
rootRef: T,
|
|
141
|
-
type: "table"
|
|
142
|
-
});
|
|
143
|
-
if (n.name) {
|
|
144
|
-
const e = Ce(n.name, M);
|
|
145
|
-
he(() => {
|
|
146
|
-
e();
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
return $(M), (e, t) => {
|
|
150
|
-
const o = S("el-table-column"), l = S("el-tooltip"), k = S("el-button"), ce = S("el-pagination");
|
|
151
|
-
return e.hidden ? d("", !0) : (c(), y("div", {
|
|
152
|
-
key: 0,
|
|
153
|
-
class: "table-render",
|
|
154
|
-
ref_key: "rootRef",
|
|
155
|
-
ref: T
|
|
156
|
-
}, [
|
|
157
|
-
v(p(Se), {
|
|
158
|
-
ref_key: "tableRef",
|
|
159
|
-
ref: C,
|
|
160
|
-
data: s.value,
|
|
161
|
-
"highlight-current-row": e.highlightCurrentRow,
|
|
162
|
-
"row-key": e.rowKey,
|
|
163
|
-
stripe: e.stripe,
|
|
164
|
-
onRowClick: H,
|
|
165
|
-
onRowDblclick: K,
|
|
166
|
-
onSelectionChange: A,
|
|
167
|
-
onCurrentChange: q
|
|
168
|
-
}, {
|
|
169
|
-
empty: u(() => [
|
|
170
|
-
R("div", Re, [
|
|
171
|
-
v(p(ke), {
|
|
172
|
-
name: "tableEmpty",
|
|
173
|
-
style: { width: 56, height: 56 }
|
|
174
|
-
}),
|
|
175
|
-
t[2] || (t[2] = R("div", null, "No data available,please check", -1))
|
|
176
|
-
])
|
|
177
|
-
]),
|
|
178
|
-
default: u(() => [
|
|
179
|
-
e.multipleSelection ? (c(), w(o, {
|
|
180
|
-
key: 0,
|
|
181
|
-
type: "selection",
|
|
182
|
-
width: "55"
|
|
183
|
-
})) : d("", !0),
|
|
184
|
-
(c(!0), y(_, null, E(e.columns, (a) => (c(), y(_, {
|
|
185
|
-
key: a.key
|
|
186
|
-
}, [
|
|
187
|
-
a.hidden ? d("", !0) : (c(), w(o, {
|
|
188
|
-
key: 0,
|
|
189
|
-
prop: a.key,
|
|
190
|
-
"min-width": a.minWidth,
|
|
191
|
-
fixed: a.fixed || !1
|
|
192
|
-
}, {
|
|
193
|
-
header: u(() => [
|
|
194
|
-
v(l, {
|
|
195
|
-
class: "box-item",
|
|
196
|
-
effect: "dark",
|
|
197
|
-
content: a.label,
|
|
198
|
-
"show-after": 300,
|
|
199
|
-
placement: "top"
|
|
200
|
-
}, {
|
|
201
|
-
default: u(() => [
|
|
202
|
-
R("div", _e, N(a.label), 1)
|
|
203
|
-
]),
|
|
204
|
-
_: 2
|
|
205
|
-
}, 1032, ["content"])
|
|
206
|
-
]),
|
|
207
|
-
default: u(({ row: f }) => [
|
|
208
|
-
v(l, {
|
|
209
|
-
class: "box-item",
|
|
210
|
-
effect: "dark",
|
|
211
|
-
content: p(z) ? p(z)(a.key, f) : f[a.key],
|
|
212
|
-
"show-after": 300,
|
|
213
|
-
placement: "top"
|
|
214
|
-
}, {
|
|
215
|
-
default: u(() => [
|
|
216
|
-
R("div", be, N(p(z) ? p(z)(a.key, f) : f[a.key]), 1)
|
|
217
|
-
]),
|
|
218
|
-
_: 2
|
|
219
|
-
}, 1032, ["content"])
|
|
220
|
-
]),
|
|
221
|
-
_: 2
|
|
222
|
-
}, 1032, ["prop", "min-width", "fixed"]))
|
|
223
|
-
], 64))), 128)),
|
|
224
|
-
e.rowBtns && e.rowBtns.length > 0 ? (c(), w(o, {
|
|
225
|
-
key: 1,
|
|
226
|
-
label: "Action",
|
|
227
|
-
fixed: "right",
|
|
228
|
-
align: "left"
|
|
229
|
-
}, {
|
|
230
|
-
default: u(({ row: a, $index: f }) => [
|
|
231
|
-
(c(!0), y(_, null, E(e.rowBtns, (i) => (c(), y(_, {
|
|
232
|
-
key: i.key
|
|
233
|
-
}, [
|
|
234
|
-
i.condition === void 0 || i.condition === null || p(ve)(i.condition, { $row: a }) ? (c(), w(k, {
|
|
235
|
-
key: 0,
|
|
236
|
-
disabled: i.disabled,
|
|
237
|
-
size: "small",
|
|
238
|
-
type: i.type,
|
|
239
|
-
onClick: (De) => j(i, a, f)
|
|
240
|
-
}, {
|
|
241
|
-
default: u(() => [
|
|
242
|
-
i.icon ? (c(), w(we, {
|
|
243
|
-
key: 0,
|
|
244
|
-
name: i.icon.name,
|
|
245
|
-
color: i.icon.color,
|
|
246
|
-
class: fe({ "btn-icon": i.text || i.label })
|
|
247
|
-
}, null, 8, ["name", "color", "class"])) : d("", !0),
|
|
248
|
-
me(" " + N(i.label), 1)
|
|
249
|
-
]),
|
|
250
|
-
_: 2
|
|
251
|
-
}, 1032, ["disabled", "type", "onClick"])) : d("", !0)
|
|
252
|
-
], 64))), 128))
|
|
253
|
-
]),
|
|
254
|
-
_: 1
|
|
255
|
-
})) : d("", !0)
|
|
256
|
-
]),
|
|
257
|
-
_: 1
|
|
258
|
-
}, 8, ["data", "highlight-current-row", "row-key", "stripe"]),
|
|
259
|
-
!e.hiddenPagination && b.value > 0 ? (c(), y("div", Be, [
|
|
260
|
-
v(ce, {
|
|
261
|
-
background: "",
|
|
262
|
-
layout: "total,sizes, prev, pager, next,jumper",
|
|
263
|
-
total: b.value,
|
|
264
|
-
"page-sizes": e.pageSizes || [5, 10, 20, 30, 40],
|
|
265
|
-
"default-page-size": e.defaultPageSize,
|
|
266
|
-
"current-page": r.value.pageNum,
|
|
267
|
-
"onUpdate:currentPage": t[0] || (t[0] = (a) => r.value.pageNum = a),
|
|
268
|
-
"page-size": r.value.pageSize,
|
|
269
|
-
"onUpdate:pageSize": t[1] || (t[1] = (a) => r.value.pageSize = a),
|
|
270
|
-
onSizeChange: ee,
|
|
271
|
-
onCurrentChange: te
|
|
272
|
-
}, null, 8, ["total", "page-sizes", "default-page-size", "current-page", "page-size"])
|
|
273
|
-
])) : d("", !0)
|
|
274
|
-
], 512));
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
}), Ee = /* @__PURE__ */ ze(Ne, [["__scopeId", "data-v-c033c849"]]);
|
|
278
|
-
export {
|
|
279
|
-
Ee as default
|
|
280
|
-
};
|