asiaint-lowcode 3.0.16 → 3.0.17
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 +137 -137
- package/dist/index.d.ts +17 -0
- package/dist/lazy/{Card-DIBN4bRf.js → Card-C5_msSt_.js} +1 -1
- package/dist/lazy/CardList-MgVKIygB.js +108 -0
- package/dist/lazy/{CardListItem-DbXsd1_k.js → CardListItem-CKntC7cg.js} +4 -4
- package/dist/lazy/{Cascader-BZhmVWOO.js → Cascader-CYH5Fi7i.js} +7 -6
- package/dist/lazy/{Checkbox-B1TSYANT.js → Checkbox-D53Paz5b.js} +7 -6
- package/dist/lazy/{Collapse-C8VWxgHp.js → Collapse-Cmx5or4b.js} +1 -1
- package/dist/lazy/{Component-NvoLQyab.js → Component-CGdDOPOy.js} +1 -1
- package/dist/lazy/{Component-CUa78qLF.js → Component-CU23NOb2.js} +1 -1
- package/dist/lazy/{Component-CqAhbbGQ.js → Component-Cj1LHwcP.js} +1 -1
- package/dist/lazy/{Component-D-Eh8B-j.js → Component-D0dwgR6z.js} +1 -1
- package/dist/lazy/{Component-Cmw2Jlj3.js → Component-DF8iAcIj.js} +1 -1
- package/dist/lazy/{Component-DUuuNUxC.js → Component-gsuTGjd3.js} +1 -1
- package/dist/lazy/CurdCard-B837mmwu.js +108 -0
- package/dist/lazy/{Custom-zNcfkvdD.js → Custom-_TKg63Y-.js} +1 -1
- package/dist/lazy/{FormList-ChQYp1l-.js → FormList-BpRr23C5.js} +1 -1
- package/dist/lazy/{Grid-GCB39VOw.js → Grid-uJbOswN2.js} +1 -1
- package/dist/lazy/{Inline-D1ZMiudr.js → Inline-JPrJPoID.js} +1 -1
- package/dist/lazy/{JsonEdit-BK25HRpb.js → JsonEdit-BZR2tMmu.js} +1 -1
- package/dist/lazy/{ObjGroup-DLXLO2wj.js → ObjGroup-BFLXonc_.js} +1 -1
- package/dist/lazy/OfferDetails-wBzkM5UY.js +163 -0
- package/dist/lazy/{Radio-DoOsjG7K.js → Radio-DY3h8hvk.js} +22 -21
- package/dist/lazy/{SearchSelect-CktfCSrM.js → SearchSelect-BA6DwHFz.js} +15 -14
- package/dist/lazy/{Select-DgAQhalx.js → Select-B5xgS3RP.js} +4 -3
- package/dist/lazy/Table-lhInsLy-.js +280 -0
- package/dist/lazy/{Tabs-C7ZXJbOT.js → Tabs-DvbrjYdV.js} +1 -1
- package/dist/lazy/Wrapper-DOKiemVa.js +30 -0
- package/dist/lazy/{index-BvOUGCFQ.js → index-KOkHm1wc.js} +5117 -4983
- package/dist/lazy/{useSelect-BqqanrGo.js → useSelect-DnnrbcQO.js} +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/dist/lazy/CardList-DkwHDPNp.js +0 -51
- package/dist/lazy/CurdCard-BSgF68nl.js +0 -85
- package/dist/lazy/OfferDetails-CKwTw0z4.js +0 -95
- package/dist/lazy/Table-C3PlF9J4.js +0 -273
- package/dist/lazy/Wrapper-DIpJqF_p.js +0 -22
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { defineComponent as D, resolveComponent as I, openBlock as l, createBlock as N, withCtx as F, createVNode as T, createElementVNode as a, createElementBlock as r, Fragment as c, renderList as _, toDisplayString as f, createCommentVNode as O, ref as M, inject as y, watchEffect as P, onMounted as $, normalizeStyle as z } from "vue";
|
|
2
|
+
import { C as A } from "./CardListItem-CKntC7cg.js";
|
|
3
|
+
import { $ as L, b as R } from "./index-KOkHm1wc.js";
|
|
4
|
+
const V = { class: "content" }, K = { class: "product-list" }, j = { class: "attribute-list" }, x = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "attribute-list-item"
|
|
7
|
+
}, U = { class: "product-title attribute-title" }, q = { class: "attribute-item-list" }, G = { class: "attribute-label" }, H = { class: "attribute-value" }, J = /* @__PURE__ */ D({
|
|
8
|
+
__name: "OfferDetailItem",
|
|
9
|
+
props: {
|
|
10
|
+
data: {},
|
|
11
|
+
btns: {}
|
|
12
|
+
},
|
|
13
|
+
setup(g) {
|
|
14
|
+
return (o, d) => {
|
|
15
|
+
const b = I("el-popover");
|
|
16
|
+
return l(), N(b, {
|
|
17
|
+
"popper-class": "offer-detail",
|
|
18
|
+
placement: "right"
|
|
19
|
+
}, {
|
|
20
|
+
reference: F(() => [
|
|
21
|
+
T(A, {
|
|
22
|
+
data: o.data,
|
|
23
|
+
btns: o.btns
|
|
24
|
+
}, null, 8, ["data", "btns"])
|
|
25
|
+
]),
|
|
26
|
+
default: F(() => [
|
|
27
|
+
a("div", V, [
|
|
28
|
+
d[0] || (d[0] = a("div", { class: "product-title" }, "Product", -1)),
|
|
29
|
+
a("div", K, [
|
|
30
|
+
(l(!0), r(c, null, _(o.data.product, (s) => (l(), r("div", {
|
|
31
|
+
class: "product-item",
|
|
32
|
+
key: s.label
|
|
33
|
+
}, f(s.label), 1))), 128))
|
|
34
|
+
]),
|
|
35
|
+
a("div", j, [
|
|
36
|
+
(l(!0), r(c, null, _(o.data.product, (s) => (l(), r(c, {
|
|
37
|
+
key: s.label
|
|
38
|
+
}, [
|
|
39
|
+
s.children.length > 0 ? (l(), r("div", x, [
|
|
40
|
+
a("div", U, f(s.label), 1),
|
|
41
|
+
a("div", q, [
|
|
42
|
+
(l(!0), r(c, null, _(s.children, (u) => (l(), r("div", {
|
|
43
|
+
class: "attribute-item",
|
|
44
|
+
key: u.label
|
|
45
|
+
}, [
|
|
46
|
+
a("div", G, f(u.label), 1),
|
|
47
|
+
a("div", H, f(u.value || "--"), 1)
|
|
48
|
+
]))), 128))
|
|
49
|
+
])
|
|
50
|
+
])) : O("", !0)
|
|
51
|
+
], 64))), 128))
|
|
52
|
+
])
|
|
53
|
+
])
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}), Q = /* @__PURE__ */ D({
|
|
60
|
+
__name: "OfferDetails",
|
|
61
|
+
props: {
|
|
62
|
+
title: {},
|
|
63
|
+
key: {},
|
|
64
|
+
rulePath: {},
|
|
65
|
+
rowKey: {},
|
|
66
|
+
showDynamicSearch: { type: Boolean },
|
|
67
|
+
multipleSelection: { type: Boolean },
|
|
68
|
+
highlightCurrentRow: { type: Boolean },
|
|
69
|
+
"highlight-current-row": { type: Boolean },
|
|
70
|
+
stripe: { type: Boolean },
|
|
71
|
+
rowClick: {},
|
|
72
|
+
rowDbClick: {},
|
|
73
|
+
sizeChange: {},
|
|
74
|
+
pageChange: {},
|
|
75
|
+
topBtns: {},
|
|
76
|
+
rowBtns: {},
|
|
77
|
+
hidden: { type: Boolean },
|
|
78
|
+
hiddenPagination: { type: Boolean },
|
|
79
|
+
handleCurrentChange: {},
|
|
80
|
+
pageSizes: {},
|
|
81
|
+
defaultPageSize: {},
|
|
82
|
+
gridColumns: { default: 3 },
|
|
83
|
+
gap: { default: 16 },
|
|
84
|
+
footerText: {},
|
|
85
|
+
onClickFooter: {},
|
|
86
|
+
data: {},
|
|
87
|
+
columns: {}
|
|
88
|
+
},
|
|
89
|
+
setup(g) {
|
|
90
|
+
var B, E;
|
|
91
|
+
const o = g, d = M(), b = y("ruleModule", void 0), s = y("pageMethodMap", {}), u = () => {
|
|
92
|
+
try {
|
|
93
|
+
b[o.onClickFooter](s, o.data);
|
|
94
|
+
} catch (e) {
|
|
95
|
+
console.error(e);
|
|
96
|
+
}
|
|
97
|
+
}, k = M([]), m = (B = o.columns.find((e) => e.position === "title")) == null ? void 0 : B.key, v = (E = o.columns.find((e) => e.position === "subTitle")) == null ? void 0 : E.key, p = o.columns.find((e) => e.position === "footer"), S = (e) => {
|
|
98
|
+
const t = [];
|
|
99
|
+
return e.children && e.children.length > 0 && e.children.forEach((n) => {
|
|
100
|
+
const h = {
|
|
101
|
+
label: n.OFFER_NAME,
|
|
102
|
+
children: []
|
|
103
|
+
};
|
|
104
|
+
n.children && n.children.length > 0 && n.children.forEach((w) => {
|
|
105
|
+
h.children.push({
|
|
106
|
+
label: w.OFFER_NAME,
|
|
107
|
+
value: w.ATTR_VALUE
|
|
108
|
+
});
|
|
109
|
+
}), t.push(h);
|
|
110
|
+
}), t;
|
|
111
|
+
}, C = y(L), i = C ? C.translateFn : null;
|
|
112
|
+
return P(() => {
|
|
113
|
+
o.data && (d.value = o.data.map((e) => {
|
|
114
|
+
const t = {
|
|
115
|
+
content: []
|
|
116
|
+
};
|
|
117
|
+
return m && (t.title = i ? i(m, e) : e[m]), v && (t.subTitle = i ? i(v, e) : e[v]), p && (t.footer = {
|
|
118
|
+
icon: p.footerIcon || "icon-tishi",
|
|
119
|
+
text: `${p.label}: ${i ? i(p.key, e) : e[p.key]}`
|
|
120
|
+
}), e.children && (t.product = S(e)), o.columns.forEach((n) => {
|
|
121
|
+
n.position === "content" && t.content.push({
|
|
122
|
+
label: n.label,
|
|
123
|
+
value: i ? i(n.key, e) : e[n.key]
|
|
124
|
+
});
|
|
125
|
+
}), t;
|
|
126
|
+
}));
|
|
127
|
+
}), $(() => {
|
|
128
|
+
var e;
|
|
129
|
+
k.value = (e = o.rowBtns) == null ? void 0 : e.map((t) => ({
|
|
130
|
+
icon: t.icon && t.icon.name ? t.icon.name : "icon-tishi",
|
|
131
|
+
label: t.label,
|
|
132
|
+
onClick: t.onClick
|
|
133
|
+
}));
|
|
134
|
+
}), (e, t) => (l(), r(c, null, [
|
|
135
|
+
a("div", {
|
|
136
|
+
class: "card-list",
|
|
137
|
+
style: z({
|
|
138
|
+
"--columns": e.gridColumns,
|
|
139
|
+
"--gap": e.gap + "px"
|
|
140
|
+
})
|
|
141
|
+
}, [
|
|
142
|
+
(l(!0), r(c, null, _(d.value, (n, h) => (l(), r("div", {
|
|
143
|
+
class: "card-list-item",
|
|
144
|
+
key: h
|
|
145
|
+
}, [
|
|
146
|
+
T(J, {
|
|
147
|
+
data: n,
|
|
148
|
+
btns: k.value
|
|
149
|
+
}, null, 8, ["data", "btns"])
|
|
150
|
+
]))), 128))
|
|
151
|
+
], 4),
|
|
152
|
+
a("div", {
|
|
153
|
+
class: "card-list-footer",
|
|
154
|
+
onClick: u
|
|
155
|
+
}, [
|
|
156
|
+
a("span", null, f(e.footerText), 1)
|
|
157
|
+
])
|
|
158
|
+
], 64));
|
|
159
|
+
}
|
|
160
|
+
}), Z = /* @__PURE__ */ R(Q, [["__scopeId", "data-v-5365ff23"]]);
|
|
161
|
+
export {
|
|
162
|
+
Z as default
|
|
163
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as z, mergeModels as S, useModel as T, inject as K, resolveComponent as p, resolveDirective as w, openBlock as
|
|
2
|
-
import { u as $ } from "./index-
|
|
3
|
-
import { u as j } from "./useSelect-
|
|
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-KOkHm1wc.js";
|
|
3
|
+
import { u as j } from "./useSelect-DnnrbcQO.js";
|
|
4
4
|
const E = { key: 0 }, L = {
|
|
5
5
|
key: 0,
|
|
6
6
|
style: { "font-size": "12px" }
|
|
@@ -17,6 +17,7 @@ const E = { key: 0 }, L = {
|
|
|
17
17
|
name: { default: "" },
|
|
18
18
|
onChange: {},
|
|
19
19
|
read: { type: Boolean },
|
|
20
|
+
clearable: { type: Boolean },
|
|
20
21
|
optionType: { default: "circle" },
|
|
21
22
|
direction: { default: "horizontal" },
|
|
22
23
|
space: { default: 20 }
|
|
@@ -26,7 +27,7 @@ const E = { key: 0 }, L = {
|
|
|
26
27
|
}),
|
|
27
28
|
emits: ["update:modelValue"],
|
|
28
29
|
setup(f) {
|
|
29
|
-
const u = f, c = T(f, "modelValue"), v = $(), b = K("ruleModule", void 0), V = K("pageMethodMap", {}),
|
|
30
|
+
const u = f, c = T(f, "modelValue"), v = $(), b = K("ruleModule", void 0), V = K("pageMethodMap", {}), B = (e) => {
|
|
30
31
|
const { valueKey: i = "value", name: s } = u;
|
|
31
32
|
let t = {};
|
|
32
33
|
if (t = n.value.find((r) => r[i] === e) || {}, v.selectData && s && v.updateSelectData(s, t), u.onChange && b)
|
|
@@ -38,13 +39,13 @@ const E = { key: 0 }, L = {
|
|
|
38
39
|
}, { currentOptions: n, loading: g } = j(u);
|
|
39
40
|
return (e, i) => {
|
|
40
41
|
var h;
|
|
41
|
-
const s = p("el-radio"), t = p("el-radio-button"), r = p("el-space"),
|
|
42
|
-
return e.read ? (
|
|
43
|
-
!l(n).length && !l(g) ? (
|
|
44
|
-
I((
|
|
42
|
+
const s = p("el-radio"), t = p("el-radio-button"), r = p("el-space"), D = p("el-radio-group"), _ = w("loading");
|
|
43
|
+
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 }, [
|
|
44
|
+
!l(n).length && !l(g) ? (o(), d("div", L, "暂无选项")) : N("", !0),
|
|
45
|
+
I((o(), y(D, k({
|
|
45
46
|
modelValue: c.value,
|
|
46
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
47
|
-
onChange:
|
|
47
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => c.value = a),
|
|
48
|
+
onChange: B
|
|
48
49
|
}, e.$attrs), {
|
|
49
50
|
default: C(() => [
|
|
50
51
|
P(r, {
|
|
@@ -54,17 +55,17 @@ const E = { key: 0 }, L = {
|
|
|
54
55
|
alignment: "normal"
|
|
55
56
|
}, {
|
|
56
57
|
default: C(() => [
|
|
57
|
-
e.optionType === "circle" || e.optionType === "border" ? (
|
|
58
|
-
key:
|
|
59
|
-
label:
|
|
60
|
-
value:
|
|
61
|
-
disabled:
|
|
58
|
+
e.optionType === "circle" || e.optionType === "border" ? (o(!0), d(m, { key: 0 }, M(l(n), (a) => (o(), y(s, {
|
|
59
|
+
key: a[e.valueKey],
|
|
60
|
+
label: a[e.labelKey],
|
|
61
|
+
value: a[e.valueKey],
|
|
62
|
+
disabled: a[e.disabledKey],
|
|
62
63
|
border: e.optionType === "border"
|
|
63
|
-
}, null, 8, ["label", "value", "disabled", "border"]))), 128)) : (
|
|
64
|
-
key:
|
|
65
|
-
label:
|
|
66
|
-
value:
|
|
67
|
-
disabled:
|
|
64
|
+
}, null, 8, ["label", "value", "disabled", "border"]))), 128)) : (o(!0), d(m, { key: 1 }, M(l(n), (a) => (o(), y(t, k({
|
|
65
|
+
key: a[e.valueKey],
|
|
66
|
+
label: a[e.labelKey],
|
|
67
|
+
value: a[e.valueKey],
|
|
68
|
+
disabled: a[e.disabledKey],
|
|
68
69
|
ref_for: !0
|
|
69
70
|
}, e.$attrs), null, 16, ["label", "value", "disabled"]))), 128))
|
|
70
71
|
]),
|
|
@@ -73,7 +74,7 @@ const E = { key: 0 }, L = {
|
|
|
73
74
|
]),
|
|
74
75
|
_: 1
|
|
75
76
|
}, 16, ["modelValue"])), [
|
|
76
|
-
[
|
|
77
|
+
[_, l(g)]
|
|
77
78
|
])
|
|
78
79
|
], 64));
|
|
79
80
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as w, mergeModels as A, useModel as F, inject as S, resolveComponent as f, resolveDirective as I, openBlock as o, createElementBlock as i, toDisplayString as y, unref as u, withDirectives as N, createBlock as k, mergeProps as j, withCtx as b, Fragment as P, renderList as $, createTextVNode as E, createVNode as C } from "vue";
|
|
2
|
-
import { u as L, _ as O, b as T } from "./index-
|
|
3
|
-
import { u as U } from "./useSelect-
|
|
2
|
+
import { u as L, _ as O, b as T } from "./index-KOkHm1wc.js";
|
|
3
|
+
import { u as U } from "./useSelect-DnnrbcQO.js";
|
|
4
4
|
const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "search-select-wrapper"
|
|
@@ -19,7 +19,8 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
|
|
|
19
19
|
apiParams: {},
|
|
20
20
|
dependentFields: {},
|
|
21
21
|
name: { default: "" },
|
|
22
|
-
onChange: {}
|
|
22
|
+
onChange: {},
|
|
23
|
+
clearable: { type: Boolean }
|
|
23
24
|
}, {
|
|
24
25
|
modelValue: { type: [String, Number, Boolean, Array] },
|
|
25
26
|
modelModifiers: {}
|
|
@@ -27,34 +28,34 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
|
|
|
27
28
|
emits: ["update:modelValue"],
|
|
28
29
|
setup(v) {
|
|
29
30
|
const t = v, d = F(v, "modelValue"), h = L(), c = S("ruleModule", void 0), _ = S("pageMethodMap", {}), M = (e) => {
|
|
30
|
-
const { valueKey:
|
|
31
|
+
const { valueKey: s = "value", multiple: m, name: p } = t;
|
|
31
32
|
let n = {};
|
|
32
|
-
if (m && Array.isArray(e) ? n =
|
|
33
|
+
if (m && Array.isArray(e) ? n = r.value.filter((a) => e.includes(a[s])) : n = r.value.find((a) => a[s] === e) || {}, h.selectData && p && h.updateSelectData(p, n), t.onChange && c)
|
|
33
34
|
try {
|
|
34
35
|
c[t.onChange](_, e, n);
|
|
35
36
|
} catch (a) {
|
|
36
37
|
console.error(a);
|
|
37
38
|
}
|
|
38
|
-
},
|
|
39
|
+
}, B = () => {
|
|
39
40
|
if (t.onSearch && c)
|
|
40
41
|
try {
|
|
41
42
|
c[t.onSearch](_);
|
|
42
43
|
} catch (e) {
|
|
43
44
|
console.error(e);
|
|
44
45
|
}
|
|
45
|
-
}, { currentOptions:
|
|
46
|
-
return (e,
|
|
46
|
+
}, { currentOptions: r, loading: V } = U(t);
|
|
47
|
+
return (e, s) => {
|
|
47
48
|
var g;
|
|
48
49
|
const m = f("el-option"), p = f("el-select"), n = f("el-button"), a = I("loading");
|
|
49
50
|
return e.read ? (o(), i("div", q, [
|
|
50
51
|
e.multiple ? (o(), i("div", z, y(d.value && d.value.map((l) => {
|
|
51
52
|
var K;
|
|
52
|
-
return (K = u(
|
|
53
|
-
}).join("、")), 1)) : (o(), i("div", G, y((g = u(
|
|
53
|
+
return (K = u(r).find((D) => D[e.valueKey] === l)) == null ? void 0 : K[e.labelKey];
|
|
54
|
+
}).join("、")), 1)) : (o(), i("div", G, y((g = u(r).find((l) => l[e.valueKey] === d.value)) == null ? void 0 : g[e.labelKey]), 1))
|
|
54
55
|
])) : (o(), i("div", H, [
|
|
55
56
|
N((o(), k(p, j({
|
|
56
57
|
modelValue: d.value,
|
|
57
|
-
"onUpdate:modelValue":
|
|
58
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => d.value = l)
|
|
58
59
|
}, e.$attrs, {
|
|
59
60
|
onChange: M,
|
|
60
61
|
multiple: e.multiple,
|
|
@@ -63,7 +64,7 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
|
|
|
63
64
|
disabled: e.disabled
|
|
64
65
|
}), {
|
|
65
66
|
default: b(() => [
|
|
66
|
-
(o(!0), i(P, null, $(u(
|
|
67
|
+
(o(!0), i(P, null, $(u(r), (l) => (o(), k(m, {
|
|
67
68
|
key: l[e.valueKey],
|
|
68
69
|
label: l[e.labelKey],
|
|
69
70
|
value: l[e.valueKey],
|
|
@@ -77,10 +78,10 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
|
|
|
77
78
|
]),
|
|
78
79
|
_: 1
|
|
79
80
|
}, 16, ["modelValue", "multiple", "disabled"])), [
|
|
80
|
-
[a, u(
|
|
81
|
+
[a, u(V)]
|
|
81
82
|
]),
|
|
82
83
|
C(n, {
|
|
83
|
-
onClick:
|
|
84
|
+
onClick: B,
|
|
84
85
|
disabled: e.disabled,
|
|
85
86
|
class: "search-btn"
|
|
86
87
|
}, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as _, mergeModels as k, useModel as B, inject as f, computed as D, resolveComponent as y, resolveDirective as S, openBlock as r, createElementBlock as i, toDisplayString as v, createBlock as b, mergeProps as A, withCtx as g, withDirectives as F, Fragment as j, renderList as w, unref as h, createTextVNode as I } from "vue";
|
|
2
|
-
import { u as N } from "./index-
|
|
3
|
-
import { u as P } from "./useSelect-
|
|
2
|
+
import { u as N } from "./index-KOkHm1wc.js";
|
|
3
|
+
import { u as P } from "./useSelect-DnnrbcQO.js";
|
|
4
4
|
const E = { key: 0 }, L = { style: { "min-height": "32px" } }, $ = /* @__PURE__ */ _({
|
|
5
5
|
__name: "Select",
|
|
6
6
|
props: /* @__PURE__ */ k({
|
|
@@ -14,7 +14,8 @@ const E = { key: 0 }, L = { style: { "min-height": "32px" } }, $ = /* @__PURE__
|
|
|
14
14
|
dependentFields: {},
|
|
15
15
|
name: { default: "" },
|
|
16
16
|
onChange: {},
|
|
17
|
-
read: { type: Boolean }
|
|
17
|
+
read: { type: Boolean },
|
|
18
|
+
clearable: { type: Boolean }
|
|
18
19
|
}, {
|
|
19
20
|
modelValue: { type: [String, Number, Boolean, Array] },
|
|
20
21
|
modelModifiers: {}
|
|
@@ -0,0 +1,280 @@
|
|
|
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
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, ref as m, watch as _, onMounted as h, resolveComponent as a, openBlock as l, createBlock as c, mergeProps as u, withCtx as d, createElementBlock as b, Fragment as v, renderList as y, createVNode as k, unref as K } from "vue";
|
|
2
|
-
import { a as V } from "./index-
|
|
2
|
+
import { a as V } from "./index-KOkHm1wc.js";
|
|
3
3
|
import "element-plus";
|
|
4
4
|
const w = /* @__PURE__ */ i({
|
|
5
5
|
__name: "Tabs",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as o, openBlock as r, createBlock as t, Transition as a, withCtx as l, withDirectives as n, createElementVNode as s, normalizeStyle as p, normalizeClass as i, createVNode as c, unref as m, vShow as f } from "vue";
|
|
2
|
+
import { a as _, b as d } from "./index-KOkHm1wc.js";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
const y = /* @__PURE__ */ o({
|
|
5
|
+
__name: "Wrapper",
|
|
6
|
+
props: {
|
|
7
|
+
children: {},
|
|
8
|
+
style: { type: [Boolean, null, String, Object, Array] },
|
|
9
|
+
type: {},
|
|
10
|
+
collapse: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
setup(u) {
|
|
13
|
+
return (e, h) => (r(), t(a, { name: "collapse" }, {
|
|
14
|
+
default: l(() => [
|
|
15
|
+
n(s("div", {
|
|
16
|
+
style: p(e.style),
|
|
17
|
+
class: i({ normal: e.type === "normal" })
|
|
18
|
+
}, [
|
|
19
|
+
c(m(_), { list: e.children }, null, 8, ["list"])
|
|
20
|
+
], 6), [
|
|
21
|
+
[f, !e.collapse]
|
|
22
|
+
])
|
|
23
|
+
]),
|
|
24
|
+
_: 1
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
}), C = /* @__PURE__ */ d(y, [["__scopeId", "data-v-01fff3e6"]]);
|
|
28
|
+
export {
|
|
29
|
+
C as default
|
|
30
|
+
};
|