asiaint-lowcode 3.0.40 → 3.0.42
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 +1 -1
- package/dist/asiaint-lowcode.umd.cjs +102 -102
- package/dist/index.d.ts +1 -0
- package/dist/lazy/{Card-CA_08riQ.js → Card-S2rqo_c1.js} +1 -1
- package/dist/lazy/{Cascader-YyqC92gQ.js → Cascader-B6o29F5o.js} +1 -1
- package/dist/lazy/Checkbox-DkV1ImsU.js +73 -0
- package/dist/lazy/{Collapse-DNv0HvCW.js → Collapse-BtnFY-rS.js} +1 -1
- package/dist/lazy/{Component-Dx_lHHnl.js → Component-Bec8N2fA.js} +1 -1
- package/dist/lazy/{Component-CSl1tuGt.js → Component-Bs3NxQX9.js} +1 -1
- package/dist/lazy/Component-Czzp1aIm.js +120 -0
- package/dist/lazy/{Component-DlHkxO96.js → Component-D1zd9pWu.js} +1 -1
- package/dist/lazy/{Component-dtCmd_35.js → Component-DL_1RCsk.js} +1 -1
- package/dist/lazy/{Component-C06SxmxT.js → Component-D_nNEscB.js} +1 -1
- package/dist/lazy/{CurdCard-CWg4r5hp.js → CurdCard-BtTbeVIr.js} +1 -1
- package/dist/lazy/{Custom-k7vvQzoi.js → Custom-DEeXXg0w.js} +1 -1
- package/dist/lazy/{FormList-D-P_JtvM.js → FormList-gRNISlkD.js} +1 -1
- package/dist/lazy/{Grid-BnQjnLAe.js → Grid-DrM36LeN.js} +1 -1
- package/dist/lazy/{Inline-zVzAJcSO.js → Inline-Db1FhCHc.js} +1 -1
- package/dist/lazy/{JsonEdit-BUu-39a6.js → JsonEdit-CXcrgpCE.js} +1 -1
- package/dist/lazy/{ObjGroup-6TaW4d2P.js → ObjGroup-DX5wa0mU.js} +1 -1
- package/dist/lazy/{OfferDetails-dzU50CFD.js → OfferDetails-Bhl0m0ui.js} +16 -15
- package/dist/lazy/Radio-BLsE0Zq8.js +81 -0
- package/dist/lazy/{SearchSelect-_LZMoBi7.js → SearchSelect-DY44BK9I.js} +2 -2
- package/dist/lazy/{Select-cTEFKHmS.js → Select-C9BLuT_m.js} +2 -2
- package/dist/lazy/Table-Cui8PTFW.js +327 -0
- package/dist/lazy/{Tabs-8W8G_tD-.js → Tabs-Csj6YLqB.js} +1 -1
- package/dist/lazy/{Wrapper-DAOR7DZM.js → Wrapper-B5YrhtF1.js} +1 -1
- package/dist/lazy/{index-odwMZo8k.js → index-Bf2453Vt.js} +3177 -3165
- package/dist/lazy/{useSelect-DE-MjuZO.js → useSelect-DqN6kHl2.js} +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/dist/lazy/Checkbox-BtZupA-A.js +0 -79
- package/dist/lazy/Component-BFemJDyv.js +0 -109
- package/dist/lazy/Radio-Bj11lAt5.js +0 -86
- package/dist/lazy/Table-DExnYGQP.js +0 -321
package/package.json
CHANGED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { defineComponent as T, mergeModels as w, useModel as D, watch as F, resolveComponent as u, resolveDirective as M, unref as a, openBlock as l, createElementBlock as n, toDisplayString as I, Fragment as d, createCommentVNode as i, withDirectives as P, createBlock as s, mergeProps as S, withCtx as f, renderList as h } from "vue";
|
|
2
|
-
import "element-plus";
|
|
3
|
-
import { u as j } from "./index-odwMZo8k.js";
|
|
4
|
-
import { u as E } from "./useSelect-DE-MjuZO.js";
|
|
5
|
-
const L = { key: 0 }, N = {
|
|
6
|
-
key: 0,
|
|
7
|
-
style: { "font-size": "12px" }
|
|
8
|
-
}, A = /* @__PURE__ */ T({
|
|
9
|
-
__name: "Checkbox",
|
|
10
|
-
props: /* @__PURE__ */ w({
|
|
11
|
-
options: { default: () => [] },
|
|
12
|
-
mode: { default: "static" },
|
|
13
|
-
labelKey: { default: "label" },
|
|
14
|
-
valueKey: { default: "value" },
|
|
15
|
-
disabledKey: {},
|
|
16
|
-
env: {},
|
|
17
|
-
apiParams: {},
|
|
18
|
-
dependentFields: {},
|
|
19
|
-
name: { default: "" },
|
|
20
|
-
onChange: {},
|
|
21
|
-
read: { type: Boolean },
|
|
22
|
-
clearable: { type: Boolean },
|
|
23
|
-
optionType: { default: "circle" },
|
|
24
|
-
direction: { default: "horizontal" },
|
|
25
|
-
space: { default: 20 }
|
|
26
|
-
}, {
|
|
27
|
-
modelValue: {},
|
|
28
|
-
modelModifiers: {}
|
|
29
|
-
}),
|
|
30
|
-
emits: ["update:modelValue"],
|
|
31
|
-
setup(p) {
|
|
32
|
-
const k = p, t = D(p, "modelValue"), g = j(), { currentOptions: r, selectChange: c, loading: m } = E(k);
|
|
33
|
-
return F(t, c), (e, y) => {
|
|
34
|
-
var b;
|
|
35
|
-
const K = u("el-checkbox"), C = u("el-checkbox-button"), _ = u("el-space"), V = u("el-checkbox-group"), z = M("loading");
|
|
36
|
-
return a(g).read ? (l(), n("div", L, I((b = t.value) == null ? void 0 : b.map((o) => {
|
|
37
|
-
var v;
|
|
38
|
-
return (v = a(r).find((B) => B[e.valueKey] === o)) == null ? void 0 : v[e.labelKey];
|
|
39
|
-
}).join("、")), 1)) : (l(), n(d, { key: 1 }, [
|
|
40
|
-
!a(r).length && !a(m) ? (l(), n("div", N, "暂无选项")) : i("", !0),
|
|
41
|
-
P((l(), s(V, S(e.$attrs, {
|
|
42
|
-
modelValue: t.value,
|
|
43
|
-
"onUpdate:modelValue": y[0] || (y[0] = (o) => t.value = o),
|
|
44
|
-
onChange: a(c)
|
|
45
|
-
}), {
|
|
46
|
-
default: f(() => [
|
|
47
|
-
e.optionType === "circle" || e.optionType === "border" ? (l(!0), n(d, { key: 0 }, h(a(r), (o) => (l(), s(K, {
|
|
48
|
-
key: o[e.valueKey],
|
|
49
|
-
label: o[e.labelKey],
|
|
50
|
-
value: o[e.valueKey],
|
|
51
|
-
border: e.optionType === "border"
|
|
52
|
-
}, null, 8, ["label", "value", "border"]))), 128)) : i("", !0),
|
|
53
|
-
e.optionType === "button" ? (l(), s(_, {
|
|
54
|
-
key: 1,
|
|
55
|
-
wrap: "",
|
|
56
|
-
size: [e.space, e.space]
|
|
57
|
-
}, {
|
|
58
|
-
default: f(() => [
|
|
59
|
-
(l(!0), n(d, null, h(a(r), (o) => (l(), s(C, {
|
|
60
|
-
key: o[e.valueKey],
|
|
61
|
-
label: o[e.labelKey],
|
|
62
|
-
value: o[e.valueKey],
|
|
63
|
-
size: "large"
|
|
64
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
65
|
-
]),
|
|
66
|
-
_: 1
|
|
67
|
-
}, 8, ["size"])) : i("", !0)
|
|
68
|
-
]),
|
|
69
|
-
_: 1
|
|
70
|
-
}, 16, ["modelValue", "onChange"])), [
|
|
71
|
-
[z, a(m)]
|
|
72
|
-
])
|
|
73
|
-
], 64));
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
export {
|
|
78
|
-
A as default
|
|
79
|
-
};
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, inject as m, ref as _, watch as b, resolveComponent as C, openBlock as c, createBlock as y, mergeProps as w, withCtx as v, createElementVNode as l, toDisplayString as N, createElementBlock as f, createCommentVNode as h, Fragment as K, renderList as B, unref as E, withModifiers as I, createTextVNode as P } from "vue";
|
|
2
|
-
import { f as V, I as F, b as j } from "./index-odwMZo8k.js";
|
|
3
|
-
import "element-plus";
|
|
4
|
-
const D = { class: "custom-tree-node" }, R = { class: "tree-node-text" }, S = { class: "tree-node-label" }, T = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "tree-node-present"
|
|
7
|
-
}, q = /* @__PURE__ */ $({
|
|
8
|
-
__name: "Component",
|
|
9
|
-
props: {
|
|
10
|
-
onNodeClick: {},
|
|
11
|
-
onLoad: {},
|
|
12
|
-
btns: {},
|
|
13
|
-
data: {},
|
|
14
|
-
props: {},
|
|
15
|
-
nodeKey: {}
|
|
16
|
-
},
|
|
17
|
-
setup(g) {
|
|
18
|
-
const o = g, a = m("ruleModule", void 0), i = m("pageMethodMap", {}), p = _(), M = (e, t) => {
|
|
19
|
-
p.value = e[o.nodeKey];
|
|
20
|
-
}, x = (e, t, n) => {
|
|
21
|
-
if (a)
|
|
22
|
-
try {
|
|
23
|
-
a[e](i, { node: t, data: n });
|
|
24
|
-
} catch (d) {
|
|
25
|
-
console.error(d);
|
|
26
|
-
}
|
|
27
|
-
}, A = (e, t) => {
|
|
28
|
-
if (o.onNodeClick && a)
|
|
29
|
-
try {
|
|
30
|
-
a[o.onNodeClick](i, { node: e, data: t });
|
|
31
|
-
} catch (n) {
|
|
32
|
-
console.error(n);
|
|
33
|
-
}
|
|
34
|
-
}, L = (e, t, n) => {
|
|
35
|
-
if (o.onLoad && a)
|
|
36
|
-
try {
|
|
37
|
-
a[o.onLoad](i, { node: e, resolve: t, reject: n });
|
|
38
|
-
} catch (d) {
|
|
39
|
-
console.error(d);
|
|
40
|
-
}
|
|
41
|
-
}, k = _([]);
|
|
42
|
-
return b(
|
|
43
|
-
//默认展开前两级节点
|
|
44
|
-
() => o.data,
|
|
45
|
-
() => {
|
|
46
|
-
var d;
|
|
47
|
-
if (!o.data || !Array.isArray(o.data))
|
|
48
|
-
return;
|
|
49
|
-
const e = o.data[0], t = [e[o.nodeKey]], n = ((d = o.props) == null ? void 0 : d.children) || "childrenNode";
|
|
50
|
-
if (Array.isArray(e[n]))
|
|
51
|
-
for (const s of e[n])
|
|
52
|
-
s[n] && t.push(s[o.nodeKey]);
|
|
53
|
-
k.value = t;
|
|
54
|
-
}
|
|
55
|
-
), (e, t) => {
|
|
56
|
-
const n = C("el-button"), d = C("el-tree");
|
|
57
|
-
return c(), y(d, w(e.$attrs, {
|
|
58
|
-
onNodeClick: A,
|
|
59
|
-
load: L,
|
|
60
|
-
ref: "treeRef",
|
|
61
|
-
class: "crm-tree",
|
|
62
|
-
indent: 32,
|
|
63
|
-
"current-node-key": p.value,
|
|
64
|
-
onCurrentChange: M,
|
|
65
|
-
"node-key": e.nodeKey,
|
|
66
|
-
props: o.props,
|
|
67
|
-
data: e.data,
|
|
68
|
-
"default-expanded-keys": k.value
|
|
69
|
-
}), {
|
|
70
|
-
default: v(({ node: s, data: u }) => [
|
|
71
|
-
l("div", D, [
|
|
72
|
-
l("div", R, [
|
|
73
|
-
l("span", S, N(s.label), 1),
|
|
74
|
-
u[e.nodeKey] === p.value ? (c(), f("div", T, "Present")) : h("", !0)
|
|
75
|
-
]),
|
|
76
|
-
l("div", null, [
|
|
77
|
-
(c(!0), f(K, null, B(e.btns, (r) => (c(), f(K, {
|
|
78
|
-
key: r.key
|
|
79
|
-
}, [
|
|
80
|
-
E(V)(r.hidden, { $node: s, $data: u }) ? h("", !0) : (c(), y(n, {
|
|
81
|
-
key: 0,
|
|
82
|
-
link: "",
|
|
83
|
-
onClick: I((z) => x(r.onClick, s, u), ["stop"]),
|
|
84
|
-
disabled: r.disabled,
|
|
85
|
-
type: r.type
|
|
86
|
-
}, {
|
|
87
|
-
default: v(() => [
|
|
88
|
-
r.icon ? (c(), y(F, {
|
|
89
|
-
key: 0,
|
|
90
|
-
name: r.icon.name,
|
|
91
|
-
color: r.icon.color,
|
|
92
|
-
class: "btn-icon"
|
|
93
|
-
}, null, 8, ["name", "color"])) : h("", !0),
|
|
94
|
-
P(" " + N(r.text), 1)
|
|
95
|
-
]),
|
|
96
|
-
_: 2
|
|
97
|
-
}, 1032, ["onClick", "disabled", "type"]))
|
|
98
|
-
], 64))), 128))
|
|
99
|
-
])
|
|
100
|
-
])
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
}, 16, ["current-node-key", "node-key", "props", "data", "default-expanded-keys"]);
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
}), O = /* @__PURE__ */ j(q, [["__scopeId", "data-v-37d6179d"]]);
|
|
107
|
-
export {
|
|
108
|
-
O as default
|
|
109
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { defineComponent as z, mergeModels as S, useModel as T, inject as K, resolveComponent as p, resolveDirective as w, openBlock as o, createElementBlock as d, toDisplayString as F, unref as l, Fragment as m, createCommentVNode as N, withDirectives as I, createBlock as y, mergeProps as k, withCtx as C, createVNode as P, renderList as M } from "vue";
|
|
2
|
-
import { u as $ } from "./index-odwMZo8k.js";
|
|
3
|
-
import { u as j } from "./useSelect-DE-MjuZO.js";
|
|
4
|
-
const E = { key: 0 }, L = {
|
|
5
|
-
key: 0,
|
|
6
|
-
style: { "font-size": "12px" }
|
|
7
|
-
}, q = /* @__PURE__ */ z({
|
|
8
|
-
__name: "Radio",
|
|
9
|
-
props: /* @__PURE__ */ S({
|
|
10
|
-
options: { default: () => [] },
|
|
11
|
-
mode: { default: "static" },
|
|
12
|
-
labelKey: { default: "label" },
|
|
13
|
-
valueKey: { default: "value" },
|
|
14
|
-
disabledKey: { default: "disabled" },
|
|
15
|
-
env: {},
|
|
16
|
-
apiParams: {},
|
|
17
|
-
dependentFields: {},
|
|
18
|
-
name: { default: "" },
|
|
19
|
-
onChange: {},
|
|
20
|
-
read: { type: Boolean },
|
|
21
|
-
clearable: { type: Boolean },
|
|
22
|
-
optionType: { default: "circle" },
|
|
23
|
-
direction: { default: "horizontal" },
|
|
24
|
-
space: { default: 20 }
|
|
25
|
-
}, {
|
|
26
|
-
modelValue: { type: [String, Number, Boolean], default: "" },
|
|
27
|
-
modelModifiers: {}
|
|
28
|
-
}),
|
|
29
|
-
emits: ["update:modelValue"],
|
|
30
|
-
setup(f) {
|
|
31
|
-
const u = f, c = T(f, "modelValue"), v = $(), b = K("ruleModule", void 0), V = K("pageMethodMap", {}), B = (e) => {
|
|
32
|
-
const { valueKey: i = "value", name: s } = u;
|
|
33
|
-
let t = {};
|
|
34
|
-
if (t = n.value.find((r) => r[i] === e) || {}, v.selectData && s && v.updateSelectData(s, t), u.onChange && b)
|
|
35
|
-
try {
|
|
36
|
-
b[u.onChange](V, e, t);
|
|
37
|
-
} catch (r) {
|
|
38
|
-
console.error(r);
|
|
39
|
-
}
|
|
40
|
-
}, { currentOptions: n, loading: g } = j(u);
|
|
41
|
-
return (e, i) => {
|
|
42
|
-
var h;
|
|
43
|
-
const s = p("el-radio"), t = p("el-radio-button"), r = p("el-space"), D = p("el-radio-group"), _ = w("loading");
|
|
44
|
-
return e.read ? (o(), d("div", E, F(((h = l(n).find((a) => a[e.valueKey] === c.value)) == null ? void 0 : h[e.labelKey]) || "--"), 1)) : (o(), d(m, { key: 1 }, [
|
|
45
|
-
!l(n).length && !l(g) ? (o(), d("div", L, "暂无选项")) : N("", !0),
|
|
46
|
-
I((o(), y(D, k({
|
|
47
|
-
modelValue: c.value,
|
|
48
|
-
"onUpdate:modelValue": i[0] || (i[0] = (a) => c.value = a),
|
|
49
|
-
onChange: B
|
|
50
|
-
}, e.$attrs), {
|
|
51
|
-
default: C(() => [
|
|
52
|
-
P(r, {
|
|
53
|
-
wrap: "",
|
|
54
|
-
direction: e.direction,
|
|
55
|
-
size: [e.space, e.space],
|
|
56
|
-
alignment: "normal"
|
|
57
|
-
}, {
|
|
58
|
-
default: C(() => [
|
|
59
|
-
e.optionType === "circle" || e.optionType === "border" ? (o(!0), d(m, { key: 0 }, M(l(n), (a) => (o(), y(s, {
|
|
60
|
-
key: a[e.valueKey],
|
|
61
|
-
label: a[e.labelKey],
|
|
62
|
-
value: a[e.valueKey],
|
|
63
|
-
disabled: a[e.disabledKey],
|
|
64
|
-
border: e.optionType === "border"
|
|
65
|
-
}, null, 8, ["label", "value", "disabled", "border"]))), 128)) : (o(!0), d(m, { key: 1 }, M(l(n), (a) => (o(), y(t, k({
|
|
66
|
-
key: a[e.valueKey],
|
|
67
|
-
label: a[e.labelKey],
|
|
68
|
-
value: a[e.valueKey],
|
|
69
|
-
disabled: a[e.disabledKey],
|
|
70
|
-
ref_for: !0
|
|
71
|
-
}, e.$attrs), null, 16, ["label", "value", "disabled"]))), 128))
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
}, 8, ["direction", "size"])
|
|
75
|
-
]),
|
|
76
|
-
_: 1
|
|
77
|
-
}, 16, ["modelValue"])), [
|
|
78
|
-
[_, l(g)]
|
|
79
|
-
])
|
|
80
|
-
], 64));
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
export {
|
|
85
|
-
q as default
|
|
86
|
-
};
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Ce, computed as E, inject as b, ref as m, useTemplateRef as ke, readonly as we, toRefs as be, onMounted as Se, nextTick as ze, onActivated as Re, onUnmounted as Be, resolveComponent as B, openBlock as u, createElementBlock as y, normalizeClass as V, withDirectives as U, createElementVNode as f, createVNode as S, unref as c, withCtx as v, createBlock as z, createCommentVNode as C, Fragment as P, renderList as j, toDisplayString as _, withModifiers as Pe, vShow as G, mergeProps as _e } from "vue";
|
|
2
|
-
import { $ as Ne, i as Me, _ as De, f as Te, I as Fe, C as $e, b as Ae } from "./index-odwMZo8k.js";
|
|
3
|
-
import { ElTable as Ee } from "element-plus";
|
|
4
|
-
const Ve = { class: "empty-content" }, Ue = ["title"], je = ["title", "onClick"], Ge = ["title"], He = { class: "row-btn-wrapper" }, Ke = /* @__PURE__ */ Ce({
|
|
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
|
-
pagerCount: {},
|
|
28
|
-
defaultPageSize: {},
|
|
29
|
-
typeSwitch: { type: Boolean },
|
|
30
|
-
displayType: { default: "table" },
|
|
31
|
-
onMounted: {},
|
|
32
|
-
onActivated: {},
|
|
33
|
-
height: {},
|
|
34
|
-
collapsible: { type: Boolean },
|
|
35
|
-
name: {}
|
|
36
|
-
},
|
|
37
|
-
setup(H, { expose: K }) {
|
|
38
|
-
const n = H, R = E(() => n.displayType ? n.displayType : n.typeSwitch ? "card" : "table"), L = b("ruleModule", void 0), N = b("ruleMap", void 0), d = E(() => n.rulePath && N[n.rulePath] ? N[n.rulePath] : L), g = b("pageMethodMap", {}), W = b("getGlobalParams", () => {
|
|
39
|
-
}), M = b(Ne), h = M ? M.translateFn : null, k = m(), q = (e, t, o) => {
|
|
40
|
-
i.value[e] && (i.value[e][t] = o);
|
|
41
|
-
}, I = (e, t) => {
|
|
42
|
-
const o = n.columns.find((r) => r.key === e);
|
|
43
|
-
o && (o.hidden = !t);
|
|
44
|
-
}, D = (e, t, o) => {
|
|
45
|
-
try {
|
|
46
|
-
d.value[e.onClick](g, t, o);
|
|
47
|
-
} catch (r) {
|
|
48
|
-
console.error(r);
|
|
49
|
-
}
|
|
50
|
-
}, J = (e) => {
|
|
51
|
-
if (n.rowClick)
|
|
52
|
-
try {
|
|
53
|
-
d.value[n.rowClick](g, e);
|
|
54
|
-
} catch (t) {
|
|
55
|
-
console.error(t);
|
|
56
|
-
}
|
|
57
|
-
}, O = (e) => {
|
|
58
|
-
if (n.rowDbClick)
|
|
59
|
-
try {
|
|
60
|
-
d.value[n.rowDbClick](g, e);
|
|
61
|
-
} catch (t) {
|
|
62
|
-
console.error(t);
|
|
63
|
-
}
|
|
64
|
-
}, Q = m([]), X = (e) => {
|
|
65
|
-
Q.value = e;
|
|
66
|
-
}, Y = () => {
|
|
67
|
-
var e;
|
|
68
|
-
(e = k.value) == null || e.clearSelection();
|
|
69
|
-
}, Z = () => i.value, T = m(), x = (e) => {
|
|
70
|
-
if (T.value = e, !!n.handleCurrentChange)
|
|
71
|
-
try {
|
|
72
|
-
d.value[n.handleCurrentChange](g, e);
|
|
73
|
-
} catch (t) {
|
|
74
|
-
console.error(t);
|
|
75
|
-
}
|
|
76
|
-
}, ee = () => T.value, te = () => {
|
|
77
|
-
var e;
|
|
78
|
-
return (e = k.value) == null ? void 0 : e.getSelectionRows();
|
|
79
|
-
}, ne = async () => !0, ae = (e, t) => {
|
|
80
|
-
var r;
|
|
81
|
-
const o = (r = n.topBtns) == null ? void 0 : r.find((w) => w.key === e);
|
|
82
|
-
o && (o.hidden = t);
|
|
83
|
-
}, oe = (e, t) => {
|
|
84
|
-
var r;
|
|
85
|
-
const o = (r = n.rowBtns) == null ? void 0 : r.find((w) => w.key === e);
|
|
86
|
-
o && (o.condition = !t);
|
|
87
|
-
}, F = m(0), le = (e) => {
|
|
88
|
-
F.value = e;
|
|
89
|
-
}, l = m({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), re = () => l.value, ie = (e) => {
|
|
90
|
-
let t = !1;
|
|
91
|
-
return e.pageNum > -1 && (l.value.pageNum !== e.pageNum && (t = !0), l.value.pageNum = e.pageNum), e.pageSize > -1 && (l.value.pageSize !== e.pageSize && (t = !0), l.value.pageSize = e.pageSize), { pagination: l.value, isChange: t };
|
|
92
|
-
}, se = (e) => {
|
|
93
|
-
if (l.value.pageNum = 1, l.value.pageSize = e, !!n.sizeChange)
|
|
94
|
-
try {
|
|
95
|
-
d.value[n.sizeChange](g, l.value);
|
|
96
|
-
} catch (t) {
|
|
97
|
-
console.error(t);
|
|
98
|
-
}
|
|
99
|
-
}, ue = (e) => {
|
|
100
|
-
if (l.value.pageNum = e, !!n.pageChange)
|
|
101
|
-
try {
|
|
102
|
-
d.value[n.pageChange](g, l.value);
|
|
103
|
-
} catch (t) {
|
|
104
|
-
console.error(t);
|
|
105
|
-
}
|
|
106
|
-
}, ce = (e) => {
|
|
107
|
-
var t;
|
|
108
|
-
(t = k.value) == null || t.setCurrentRow(e);
|
|
109
|
-
}, pe = (e) => {
|
|
110
|
-
var t;
|
|
111
|
-
(t = k.value) == null || t.setCurrentRow(i.value[e]);
|
|
112
|
-
}, de = (e, t, o) => {
|
|
113
|
-
n.columns.forEach((r) => {
|
|
114
|
-
r.key === e && r[t] && (r[t] = o);
|
|
115
|
-
});
|
|
116
|
-
}, i = m([]), ge = (e) => {
|
|
117
|
-
i.value = e;
|
|
118
|
-
}, he = (e = {}) => {
|
|
119
|
-
i.value.push(e);
|
|
120
|
-
}, ye = (e) => {
|
|
121
|
-
e >= 0 && e < i.value.length && i.value.splice(e, 1);
|
|
122
|
-
}, ve = async () => {
|
|
123
|
-
i.value = [...i.value];
|
|
124
|
-
}, $ = ke("rootRef"), A = we({
|
|
125
|
-
...be(n),
|
|
126
|
-
setCellData: q,
|
|
127
|
-
clearSelection: Y,
|
|
128
|
-
getData: Z,
|
|
129
|
-
getCurrentRow: ee,
|
|
130
|
-
getSelectedRows: te,
|
|
131
|
-
addRow: he,
|
|
132
|
-
deleteRow: ye,
|
|
133
|
-
refresh: ve,
|
|
134
|
-
validate: ne,
|
|
135
|
-
setData: ge,
|
|
136
|
-
selectRow: ce,
|
|
137
|
-
selectRowNum: pe,
|
|
138
|
-
setTotal: le,
|
|
139
|
-
getPagination: re,
|
|
140
|
-
setPagination: ie,
|
|
141
|
-
setTopBtnHidden: ae,
|
|
142
|
-
setColVisible: I,
|
|
143
|
-
setColumn: de,
|
|
144
|
-
setRowsBtnHidden: oe,
|
|
145
|
-
rootRef: $,
|
|
146
|
-
type: "table"
|
|
147
|
-
});
|
|
148
|
-
if (Se(async () => {
|
|
149
|
-
if (!n.onMounted || !d.value)
|
|
150
|
-
return;
|
|
151
|
-
await ze();
|
|
152
|
-
const e = n.onMounted;
|
|
153
|
-
try {
|
|
154
|
-
d.value[e](g);
|
|
155
|
-
} catch (t) {
|
|
156
|
-
console.error(t);
|
|
157
|
-
}
|
|
158
|
-
}), Re(() => {
|
|
159
|
-
if (!n.onActivated || !d.value)
|
|
160
|
-
return;
|
|
161
|
-
const e = n.onActivated;
|
|
162
|
-
try {
|
|
163
|
-
d.value[e](g);
|
|
164
|
-
} catch (t) {
|
|
165
|
-
console.error(t);
|
|
166
|
-
}
|
|
167
|
-
}), n.name) {
|
|
168
|
-
const e = Me(n.name, A);
|
|
169
|
-
Be(() => {
|
|
170
|
-
e();
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
return K(A), (e, t) => {
|
|
174
|
-
const o = B("el-table-column"), r = B("el-tooltip"), w = B("el-button"), me = B("el-pagination");
|
|
175
|
-
return e.hidden ? C("", !0) : (u(), y("div", {
|
|
176
|
-
key: 0,
|
|
177
|
-
class: V(["table-render", { tableBorder: R.value === "table" }]),
|
|
178
|
-
ref_key: "rootRef",
|
|
179
|
-
ref: $
|
|
180
|
-
}, [
|
|
181
|
-
U(f("div", null, [
|
|
182
|
-
S(c(Ee), {
|
|
183
|
-
ref_key: "tableRef",
|
|
184
|
-
ref: k,
|
|
185
|
-
data: i.value,
|
|
186
|
-
"highlight-current-row": "",
|
|
187
|
-
"row-key": e.rowKey,
|
|
188
|
-
stripe: e.stripe,
|
|
189
|
-
onRowClick: J,
|
|
190
|
-
onRowDblclick: O,
|
|
191
|
-
onSelectionChange: X,
|
|
192
|
-
onCurrentChange: x,
|
|
193
|
-
height: e.height
|
|
194
|
-
}, {
|
|
195
|
-
empty: v(() => [
|
|
196
|
-
f("div", Ve, [
|
|
197
|
-
S(c(De), {
|
|
198
|
-
name: "tableEmpty",
|
|
199
|
-
style: { width: 56, height: 56 }
|
|
200
|
-
}),
|
|
201
|
-
t[2] || (t[2] = f("div", null, "No data available,please check", -1))
|
|
202
|
-
])
|
|
203
|
-
]),
|
|
204
|
-
default: v(() => [
|
|
205
|
-
e.multipleSelection ? (u(), z(o, {
|
|
206
|
-
key: 0,
|
|
207
|
-
type: "selection",
|
|
208
|
-
width: "55"
|
|
209
|
-
})) : C("", !0),
|
|
210
|
-
(u(!0), y(P, null, j(e.columns, (a) => (u(), y(P, {
|
|
211
|
-
key: a.key
|
|
212
|
-
}, [
|
|
213
|
-
a.hidden ? C("", !0) : (u(), z(o, {
|
|
214
|
-
key: 0,
|
|
215
|
-
prop: a.key,
|
|
216
|
-
"min-width": a.minWidth,
|
|
217
|
-
fixed: a.fixed || !1
|
|
218
|
-
}, {
|
|
219
|
-
header: v(() => [
|
|
220
|
-
f("div", {
|
|
221
|
-
class: "text-ellipsis",
|
|
222
|
-
title: a.label
|
|
223
|
-
}, _(a.label), 9, Ue)
|
|
224
|
-
]),
|
|
225
|
-
default: v(({ row: p, $index: s }) => [
|
|
226
|
-
a.type === "link" ? (u(), y("div", {
|
|
227
|
-
key: 0,
|
|
228
|
-
class: "text-ellipsis link-style",
|
|
229
|
-
title: c(h) ? c(h)(a.key, p) : p[a.key],
|
|
230
|
-
onClick: (fe) => D(a, p, s)
|
|
231
|
-
}, _(c(h) ? c(h)(a.key, p) : p[a.key]), 9, je)) : (u(), y("div", {
|
|
232
|
-
key: 1,
|
|
233
|
-
class: "text-ellipsis",
|
|
234
|
-
title: c(h) ? c(h)(a.key, p) : p[a.key]
|
|
235
|
-
}, _(c(h) ? c(h)(a.key, p) : p[a.key]), 9, Ge))
|
|
236
|
-
]),
|
|
237
|
-
_: 2
|
|
238
|
-
}, 1032, ["prop", "min-width", "fixed"]))
|
|
239
|
-
], 64))), 128)),
|
|
240
|
-
e.rowBtns && e.rowBtns.length > 0 ? (u(), z(o, {
|
|
241
|
-
key: 1,
|
|
242
|
-
label: "Action",
|
|
243
|
-
fixed: "right",
|
|
244
|
-
align: "left"
|
|
245
|
-
}, {
|
|
246
|
-
default: v(({ row: a, $index: p }) => [
|
|
247
|
-
f("div", He, [
|
|
248
|
-
(u(!0), y(P, null, j(e.rowBtns, (s) => (u(), y(P, {
|
|
249
|
-
key: s.key
|
|
250
|
-
}, [
|
|
251
|
-
s.condition === void 0 || s.condition === null || c(Te)(s.condition, { $row: a, $globalParams: c(W)() }) ? (u(), z(w, {
|
|
252
|
-
key: 0,
|
|
253
|
-
disabled: s.disabled,
|
|
254
|
-
link: "",
|
|
255
|
-
size: "small",
|
|
256
|
-
type: s.type,
|
|
257
|
-
onClick: Pe((fe) => D(s, a, p), ["stop"])
|
|
258
|
-
}, {
|
|
259
|
-
default: v(() => [
|
|
260
|
-
S(r, {
|
|
261
|
-
class: "box-item",
|
|
262
|
-
effect: "dark",
|
|
263
|
-
content: s.label,
|
|
264
|
-
placement: "top",
|
|
265
|
-
"popper-class": "low-tsp",
|
|
266
|
-
"show-after": 300
|
|
267
|
-
}, {
|
|
268
|
-
default: v(() => [
|
|
269
|
-
s.icon ? (u(), z(Fe, {
|
|
270
|
-
key: 0,
|
|
271
|
-
name: s.icon.name,
|
|
272
|
-
color: s.icon.color
|
|
273
|
-
}, null, 8, ["name", "color"])) : C("", !0)
|
|
274
|
-
]),
|
|
275
|
-
_: 2
|
|
276
|
-
}, 1032, ["content"])
|
|
277
|
-
]),
|
|
278
|
-
_: 2
|
|
279
|
-
}, 1032, ["disabled", "type", "onClick"])) : C("", !0)
|
|
280
|
-
], 64))), 128))
|
|
281
|
-
])
|
|
282
|
-
]),
|
|
283
|
-
_: 1
|
|
284
|
-
})) : C("", !0)
|
|
285
|
-
]),
|
|
286
|
-
_: 1
|
|
287
|
-
}, 8, ["data", "row-key", "stripe", "height"])
|
|
288
|
-
], 512), [
|
|
289
|
-
[G, R.value === "table"]
|
|
290
|
-
]),
|
|
291
|
-
U(S($e, _e({ data: i.value }, n), null, 16, ["data"]), [
|
|
292
|
-
[G, R.value === "card"]
|
|
293
|
-
]),
|
|
294
|
-
f("div", {
|
|
295
|
-
class: V(["pagination-wrapper", {
|
|
296
|
-
hidePagination: (e.hiddenPagination || i.value.length === 0) && !e.height,
|
|
297
|
-
transparentPagination: (e.hiddenPagination || i.value.length === 0) && e.height,
|
|
298
|
-
cardlistPadding: R.value === "card"
|
|
299
|
-
}])
|
|
300
|
-
}, [
|
|
301
|
-
S(me, {
|
|
302
|
-
layout: "total,sizes, prev, pager, next,jumper",
|
|
303
|
-
total: F.value,
|
|
304
|
-
"page-sizes": e.pageSizes || [5, 10, 20, 30, 40],
|
|
305
|
-
"default-page-size": e.defaultPageSize,
|
|
306
|
-
"current-page": l.value.pageNum,
|
|
307
|
-
"onUpdate:currentPage": t[0] || (t[0] = (a) => l.value.pageNum = a),
|
|
308
|
-
"page-size": l.value.pageSize,
|
|
309
|
-
"onUpdate:pageSize": t[1] || (t[1] = (a) => l.value.pageSize = a),
|
|
310
|
-
"pager-count": e.pagerCount,
|
|
311
|
-
onSizeChange: se,
|
|
312
|
-
onCurrentChange: ue
|
|
313
|
-
}, null, 8, ["total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"])
|
|
314
|
-
], 2)
|
|
315
|
-
], 2));
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
}), Ie = /* @__PURE__ */ Ae(Ke, [["__scopeId", "data-v-d2c63bba"]]);
|
|
319
|
-
export {
|
|
320
|
-
Ie as default
|
|
321
|
-
};
|