@king-one/antdv 2.5.7 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/dist/es/components/index.mjs +18 -16
- package/dist/es/components/pro-dynamic-tags/index.mjs +9 -0
- package/dist/es/components/pro-dynamic-tags/src/index.vue.mjs +7 -0
- package/dist/es/components/pro-dynamic-tags/src/index.vue2.mjs +209 -0
- package/dist/es/components/pro-dynamic-tags/src/index.vue3.mjs +1 -0
- package/dist/es/components/pro-dynamic-tags/src/style/index.mjs +2 -0
- package/dist/es/components/pro-dynamic-tags/src/types.mjs +1 -0
- package/dist/es/components/pro-selector-group/src/index.vue2.mjs +90 -106
- package/dist/es/index.mjs +26 -24
- package/dist/es/installer.mjs +6 -5
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +1 -0
- package/dist/lib/components/index.js +1 -1
- package/dist/lib/components/pro-dynamic-tags/index.js +1 -0
- package/dist/lib/components/pro-dynamic-tags/src/index.vue.js +1 -0
- package/dist/lib/components/pro-dynamic-tags/src/index.vue2.js +1 -0
- package/dist/lib/components/pro-dynamic-tags/src/index.vue3.js +1 -0
- package/dist/lib/components/pro-dynamic-tags/src/style/index.js +1 -0
- package/dist/lib/components/pro-dynamic-tags/src/types.js +1 -0
- package/dist/lib/components/pro-selector-group/src/index.vue2.js +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/installer.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/pro-dynamic-tags.css +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/pro-dynamic-tags/index.d.ts +156 -0
- package/dist/types/components/pro-dynamic-tags/src/index.vue.d.ts +153 -0
- package/dist/types/components/pro-dynamic-tags/src/types.d.ts +46 -0
- package/global.d.ts +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { KCollapseTranstion as t } from "./collapse-transtion/index.mjs";
|
|
2
|
-
import { KProModal as
|
|
3
|
-
import { KProTitle as
|
|
4
|
-
import { KScrollBar as
|
|
2
|
+
import { KProModal as m } from "./pro-modal/index.mjs";
|
|
3
|
+
import { KProTitle as x } from "./pro-title/index.mjs";
|
|
4
|
+
import { KScrollBar as l } from "./scroll-bar/index.mjs";
|
|
5
5
|
import { KCoverScrollBar as P } from "./cover-scroll-bar/index.mjs";
|
|
6
6
|
import { KScaleVirtualList as S } from "./scale-virtual-list/index.mjs";
|
|
7
7
|
import { KProTag as s } from "./pro-tag/index.mjs";
|
|
8
8
|
import { KProPicker as u } from "./pro-picker/index.mjs";
|
|
9
|
-
import { KProArea as
|
|
10
|
-
import { KProSignature as
|
|
9
|
+
import { KProArea as T } from "./pro-area/index.mjs";
|
|
10
|
+
import { KProSignature as g } from "./pro-signature/index.mjs";
|
|
11
11
|
import { KProTable as v } from "./pro-table/index.mjs";
|
|
12
12
|
import { KIcon as G } from "./icon/index.mjs";
|
|
13
13
|
import { KProUpload as b } from "./pro-upload/index.mjs";
|
|
14
|
-
import { KProContractView as
|
|
14
|
+
import { KProContractView as y } from "./pro-contract-view/index.mjs";
|
|
15
15
|
import "./pro-loading/index.mjs";
|
|
16
|
-
import { KPlusUpload as
|
|
17
|
-
import { KProOverlay as
|
|
16
|
+
import { KPlusUpload as D } from "./plus-upload/index.mjs";
|
|
17
|
+
import { KProOverlay as h } from "./pro-overlay/index.mjs";
|
|
18
18
|
import { KProSign as F } from "./pro-sign/index.mjs";
|
|
19
19
|
import { KUserSelector as L, KUserSelectorCheckbox as M } from "./pro-selector/index.mjs";
|
|
20
20
|
import { KProUserAvatar as j, KUserAvatar as q } from "./pro-user-avatar/index.mjs";
|
|
@@ -25,33 +25,35 @@ import { KFormRender as Y } from "./pro-form-render/index.mjs";
|
|
|
25
25
|
import { KProCell as _ } from "./pro-cell/index.mjs";
|
|
26
26
|
import { KProCellGroup as rr } from "./pro-cell-group/index.mjs";
|
|
27
27
|
import { KProSelectorGroup as er } from "./pro-selector-group/index.mjs";
|
|
28
|
+
import { KProDynamicTags as pr } from "./pro-dynamic-tags/index.mjs";
|
|
28
29
|
export {
|
|
29
30
|
t as KCollapseTranstion,
|
|
30
31
|
P as KCoverScrollBar,
|
|
31
32
|
N as KDeptSelector,
|
|
32
33
|
Y as KFormRender,
|
|
33
34
|
G as KIcon,
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
D as KPlusUpload,
|
|
36
|
+
T as KProArea,
|
|
36
37
|
_ as KProCell,
|
|
37
38
|
rr as KProCellGroup,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
y as KProContractView,
|
|
40
|
+
pr as KProDynamicTags,
|
|
41
|
+
m as KProModal,
|
|
42
|
+
h as KProOverlay,
|
|
41
43
|
u as KProPicker,
|
|
42
44
|
E as KProRoleSelector,
|
|
43
45
|
er as KProSelectorGroup,
|
|
44
46
|
F as KProSign,
|
|
45
|
-
|
|
47
|
+
g as KProSignature,
|
|
46
48
|
v as KProTable,
|
|
47
49
|
s as KProTag,
|
|
48
50
|
W as KProTagGroup,
|
|
49
|
-
|
|
51
|
+
x as KProTitle,
|
|
50
52
|
b as KProUpload,
|
|
51
53
|
j as KProUserAvatar,
|
|
52
54
|
H as KRoleSelector,
|
|
53
55
|
S as KScaleVirtualList,
|
|
54
|
-
|
|
56
|
+
l as KScrollBar,
|
|
55
57
|
q as KUserAvatar,
|
|
56
58
|
L as KUserSelector,
|
|
57
59
|
M as KUserSelectorCheckbox
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { defineComponent as Q, ref as y, nextTick as X, computed as M, onMounted as Y, watch as Z, onBeforeUnmount as _, createElementBlock as N, openBlock as d, normalizeStyle as S, normalizeClass as c, unref as t, createElementVNode as L, createBlock as x, createCommentVNode as D, Fragment as I, renderList as O, withCtx as m, createTextVNode as C, toDisplayString as W, createVNode as ee } from "vue";
|
|
2
|
+
import { Tag as A, Popover as le, Button as te } from "ant-design-vue";
|
|
3
|
+
import { useNamespace as ae } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
const ue = /* @__PURE__ */ Q({
|
|
5
|
+
name: "ProDynamicTags",
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { default: () => [] },
|
|
9
|
+
tagMaxWidth: { default: "auto" },
|
|
10
|
+
showAdd: { type: Boolean, default: !0 },
|
|
11
|
+
addText: { default: "添加" },
|
|
12
|
+
closable: { type: Boolean, default: !0 },
|
|
13
|
+
customClass: { default: "" },
|
|
14
|
+
customStyle: { default: () => ({}) }
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue", "add", "close", "expand"],
|
|
17
|
+
setup(o, { emit: P }) {
|
|
18
|
+
const e = o, k = P, { b: q, e: n } = ae("pro-dynamic-tags"), s = y(), T = y(), U = y(), a = y(e.modelValue.length), v = y(!1);
|
|
19
|
+
function w() {
|
|
20
|
+
v.value || (v.value = !0, a.value = e.modelValue.length), X(() => {
|
|
21
|
+
if (!s.value || !T.value || e.modelValue.length === 0) {
|
|
22
|
+
a.value = e.modelValue.length, v.value = !1;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const i = s.value.clientWidth, u = window.getComputedStyle(s.value), l = Number.parseFloat(u.paddingLeft), f = Number.parseFloat(u.paddingRight), B = Number.parseFloat(u.gap) || 8, F = e.showAdd ? 80 + B : 0, g = T.value.querySelectorAll(`.${n("tag")}`);
|
|
26
|
+
if (g.length === 0) {
|
|
27
|
+
a.value = e.modelValue.length, v.value = !1;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const K = i - l - f - F;
|
|
31
|
+
let h = 0, p = 0;
|
|
32
|
+
for (let b = 0; b < g.length; b++) {
|
|
33
|
+
const V = g[b].offsetWidth + B;
|
|
34
|
+
if (h + V <= K)
|
|
35
|
+
h += V, p++;
|
|
36
|
+
else
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
if (p === e.modelValue.length)
|
|
40
|
+
a.value = e.modelValue.length;
|
|
41
|
+
else {
|
|
42
|
+
const V = i - l - f - F - 60;
|
|
43
|
+
h = 0, p = 0;
|
|
44
|
+
for (let R = 0; R < g.length; R++) {
|
|
45
|
+
const E = g[R].offsetWidth + B;
|
|
46
|
+
if (h + E <= V)
|
|
47
|
+
h += E, p++;
|
|
48
|
+
else
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
a.value = Math.max(1, p);
|
|
52
|
+
}
|
|
53
|
+
v.value = !1;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const j = M(() => e.modelValue.length <= a.value ? e.modelValue : e.modelValue.slice(0, a.value)), $ = M(() => e.modelValue.length <= a.value ? 0 : e.modelValue.length - a.value), G = M(() => e.modelValue.length <= a.value ? [] : e.modelValue.slice(a.value));
|
|
57
|
+
function z(i) {
|
|
58
|
+
const u = [...e.modelValue], l = e.modelValue.findIndex((f) => f.value === i.value);
|
|
59
|
+
u.splice(l, 1), k("update:modelValue", u), k("close", i, l);
|
|
60
|
+
}
|
|
61
|
+
function H() {
|
|
62
|
+
k("add");
|
|
63
|
+
}
|
|
64
|
+
let r = null;
|
|
65
|
+
Y(() => {
|
|
66
|
+
w(), s.value && (r = new ResizeObserver(() => {
|
|
67
|
+
w();
|
|
68
|
+
}), r.observe(s.value));
|
|
69
|
+
}), Z(() => e.modelValue, () => {
|
|
70
|
+
w();
|
|
71
|
+
}, { deep: !0 });
|
|
72
|
+
function J() {
|
|
73
|
+
r && s.value && (r.unobserve(s.value), r.disconnect(), r = null);
|
|
74
|
+
}
|
|
75
|
+
return _(() => {
|
|
76
|
+
J();
|
|
77
|
+
}), (i, u) => (d(), N(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
ref_key: "containerRef",
|
|
81
|
+
ref: s,
|
|
82
|
+
class: c([t(q)(), o.customClass]),
|
|
83
|
+
style: S(o.customStyle)
|
|
84
|
+
},
|
|
85
|
+
[
|
|
86
|
+
L(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
ref_key: "tagsContainerRef",
|
|
90
|
+
ref: T,
|
|
91
|
+
class: c(t(n)("tags"))
|
|
92
|
+
},
|
|
93
|
+
[
|
|
94
|
+
(d(!0), N(
|
|
95
|
+
I,
|
|
96
|
+
null,
|
|
97
|
+
O(j.value, (l) => (d(), x(t(A), {
|
|
98
|
+
key: l.value,
|
|
99
|
+
closable: o.closable && l.closable !== !1,
|
|
100
|
+
class: c(t(n)("tag")),
|
|
101
|
+
style: S({ maxWidth: `${o.tagMaxWidth}px` }),
|
|
102
|
+
onClose: (f) => z(l)
|
|
103
|
+
}, {
|
|
104
|
+
default: m(() => [
|
|
105
|
+
C(
|
|
106
|
+
W(l.label),
|
|
107
|
+
1
|
|
108
|
+
/* TEXT */
|
|
109
|
+
)
|
|
110
|
+
]),
|
|
111
|
+
_: 2
|
|
112
|
+
/* DYNAMIC */
|
|
113
|
+
}, 1032, ["closable", "class", "style", "onClose"]))),
|
|
114
|
+
128
|
|
115
|
+
/* KEYED_FRAGMENT */
|
|
116
|
+
)),
|
|
117
|
+
$.value > 0 ? (d(), x(t(le), {
|
|
118
|
+
key: 0,
|
|
119
|
+
placement: "top",
|
|
120
|
+
trigger: "hover",
|
|
121
|
+
"overlay-class-name": t(n)("popover"),
|
|
122
|
+
"overlay-inner-style": {
|
|
123
|
+
width: "400px"
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
content: m(() => [
|
|
127
|
+
L(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
class: c(t(n)("popover-content"))
|
|
131
|
+
},
|
|
132
|
+
[
|
|
133
|
+
(d(!0), N(
|
|
134
|
+
I,
|
|
135
|
+
null,
|
|
136
|
+
O(G.value, (l) => (d(), x(t(A), {
|
|
137
|
+
key: l.value,
|
|
138
|
+
closable: o.closable && l.closable !== !1,
|
|
139
|
+
class: c(t(n)("popover-tag")),
|
|
140
|
+
style: S({ maxWidth: `${o.tagMaxWidth}px` }),
|
|
141
|
+
onClose: (f) => z(l)
|
|
142
|
+
}, {
|
|
143
|
+
default: m(() => [
|
|
144
|
+
C(
|
|
145
|
+
W(l.label),
|
|
146
|
+
1
|
|
147
|
+
/* TEXT */
|
|
148
|
+
)
|
|
149
|
+
]),
|
|
150
|
+
_: 2
|
|
151
|
+
/* DYNAMIC */
|
|
152
|
+
}, 1032, ["closable", "class", "style", "onClose"]))),
|
|
153
|
+
128
|
|
154
|
+
/* KEYED_FRAGMENT */
|
|
155
|
+
))
|
|
156
|
+
],
|
|
157
|
+
2
|
|
158
|
+
/* CLASS */
|
|
159
|
+
)
|
|
160
|
+
]),
|
|
161
|
+
default: m(() => [
|
|
162
|
+
ee(t(A), {
|
|
163
|
+
class: c(t(n)("more"))
|
|
164
|
+
}, {
|
|
165
|
+
default: m(() => [
|
|
166
|
+
C(
|
|
167
|
+
" +" + W($.value),
|
|
168
|
+
1
|
|
169
|
+
/* TEXT */
|
|
170
|
+
)
|
|
171
|
+
]),
|
|
172
|
+
_: 1
|
|
173
|
+
/* STABLE */
|
|
174
|
+
}, 8, ["class"])
|
|
175
|
+
]),
|
|
176
|
+
_: 1
|
|
177
|
+
/* STABLE */
|
|
178
|
+
}, 8, ["overlay-class-name"])) : D("v-if", !0)
|
|
179
|
+
],
|
|
180
|
+
2
|
|
181
|
+
/* CLASS */
|
|
182
|
+
),
|
|
183
|
+
o.showAdd ? (d(), x(t(te), {
|
|
184
|
+
key: 0,
|
|
185
|
+
ref_key: "addBtnRef",
|
|
186
|
+
ref: U,
|
|
187
|
+
type: "link",
|
|
188
|
+
class: c(t(n)("add-btn")),
|
|
189
|
+
onClick: H
|
|
190
|
+
}, {
|
|
191
|
+
default: m(() => [
|
|
192
|
+
C(
|
|
193
|
+
W(o.addText),
|
|
194
|
+
1
|
|
195
|
+
/* TEXT */
|
|
196
|
+
)
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
/* STABLE */
|
|
200
|
+
}, 8, ["class"])) : D("v-if", !0)
|
|
201
|
+
],
|
|
202
|
+
6
|
|
203
|
+
/* CLASS, STYLE */
|
|
204
|
+
));
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
export {
|
|
208
|
+
ue as default
|
|
209
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as U, useModel as T, ref as y, computed as b, watchEffect as q, nextTick as z, watch as I, provide as O, createElementBlock as h, openBlock as f, normalizeClass as m, unref as n, createCommentVNode as j, createVNode as v, withCtx as g, createElementVNode as k, normalizeStyle as G, Fragment as H, renderList as J, createBlock as V, resolveDynamicComponent as Q, mergeModels as A } from "vue";
|
|
2
2
|
import "../../index.mjs";
|
|
3
|
-
import { useNamespace as
|
|
4
|
-
import {
|
|
3
|
+
import { useNamespace as W } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
import { Tabs as X, TabPane as Y } from "ant-design-vue";
|
|
5
5
|
import "./compoents/index.mjs";
|
|
6
|
-
import { selectContextKey as
|
|
6
|
+
import { selectContextKey as Z } from "./types.mjs";
|
|
7
7
|
import "./compoents/select-box.vue.mjs";
|
|
8
|
-
import { useApi as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
8
|
+
import { useApi as ee } from "./hooks/useApi.mjs";
|
|
9
|
+
import te from "./compoents/dept.vue.mjs";
|
|
10
|
+
import le from "./compoents/role.vue.mjs";
|
|
11
|
+
import ae from "./compoents/user.vue.mjs";
|
|
12
|
+
import { KProDynamicTags as oe } from "../../pro-dynamic-tags/index.mjs";
|
|
13
|
+
import { KProModal as ne } from "../../pro-modal/index.mjs";
|
|
14
|
+
import ue from "./compoents/select-box.vue2.mjs";
|
|
15
|
+
const ie = { key: 0 }, Ve = /* @__PURE__ */ U({
|
|
15
16
|
__name: "index",
|
|
16
|
-
props: /* @__PURE__ */
|
|
17
|
+
props: /* @__PURE__ */ A({
|
|
17
18
|
title: { default: "选择器" },
|
|
18
19
|
http: {},
|
|
19
20
|
urlPrefix: {},
|
|
@@ -29,154 +30,137 @@ const ce = { key: 0 }, Ve = /* @__PURE__ */ j({
|
|
|
29
30
|
visible: { type: Boolean, required: !0, default: !1 },
|
|
30
31
|
visibleModifiers: {}
|
|
31
32
|
}),
|
|
32
|
-
emits: /* @__PURE__ */
|
|
33
|
-
setup(
|
|
34
|
-
const u =
|
|
33
|
+
emits: /* @__PURE__ */ A(["confirm", "changeTab"], ["update:modelValue", "update:visible"]),
|
|
34
|
+
setup(c, { emit: D }) {
|
|
35
|
+
const u = c, C = D, { getRole: re, roleList: ce } = ee(u.http, u.urlPrefix || ""), p = [
|
|
35
36
|
{
|
|
36
37
|
key: "dept",
|
|
37
38
|
tab: "部门",
|
|
38
|
-
component:
|
|
39
|
+
component: te
|
|
39
40
|
},
|
|
40
41
|
{
|
|
41
42
|
key: "role",
|
|
42
43
|
tab: "角色",
|
|
43
|
-
component:
|
|
44
|
+
component: le
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
47
|
key: "user",
|
|
47
48
|
tab: "用户",
|
|
48
|
-
component:
|
|
49
|
+
component: ae
|
|
49
50
|
}
|
|
50
|
-
],
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
v.value = t.map((e) => e.label).join(",");
|
|
59
|
-
}, { deep: !0, immediate: !0 }), q(async () => {
|
|
60
|
-
r.value && m.value.length > 0 && (await I(), $(m.value));
|
|
61
|
-
}), A(() => u.type, (t) => {
|
|
51
|
+
], i = T(c, "modelValue"), r = T(c, "visible"), o = y([]), a = y(u.type || "dept"), d = y({}), S = b(() => i.value.map((t) => ({
|
|
52
|
+
label: t.label || "",
|
|
53
|
+
value: t.value,
|
|
54
|
+
type: t.type
|
|
55
|
+
}))), P = b(() => o.value.length === 0 ? p : u.isSingle ? p.filter((t) => o.value.some((e) => e.type === t.key)) : p);
|
|
56
|
+
q(async () => {
|
|
57
|
+
r.value && i.value.length > 0 && (await z(), M(i.value));
|
|
58
|
+
}), I(() => u.type, (t) => {
|
|
62
59
|
t && (a.value = t);
|
|
63
60
|
});
|
|
64
|
-
function
|
|
61
|
+
function R(t) {
|
|
65
62
|
o.value = t;
|
|
66
63
|
}
|
|
67
|
-
O(
|
|
64
|
+
O(Z, {
|
|
68
65
|
http: u.http,
|
|
69
66
|
urlPrefix: u.urlPrefix || "",
|
|
70
67
|
selectedData: o,
|
|
71
68
|
currentTabKey: a,
|
|
72
|
-
changeSelectData:
|
|
69
|
+
changeSelectData: R
|
|
73
70
|
});
|
|
74
|
-
const { b:
|
|
75
|
-
function
|
|
76
|
-
t && (
|
|
71
|
+
const { b: s } = W("pro-selector-group");
|
|
72
|
+
function B(t, e) {
|
|
73
|
+
t && (d.value[e] = t);
|
|
77
74
|
}
|
|
78
|
-
const
|
|
75
|
+
const K = b(() => ({
|
|
79
76
|
width: a.value === "user" ? "600px" : "450px"
|
|
80
77
|
}));
|
|
81
|
-
function U() {
|
|
82
|
-
m.value = o.value, x("confirm"), r.value = !1;
|
|
83
|
-
}
|
|
84
78
|
function _() {
|
|
79
|
+
i.value = o.value, C("confirm"), r.value = !1;
|
|
80
|
+
}
|
|
81
|
+
function w() {
|
|
85
82
|
r.value = !1;
|
|
86
83
|
}
|
|
87
|
-
function
|
|
88
|
-
const e =
|
|
84
|
+
function M(t) {
|
|
85
|
+
const e = d.value[a.value];
|
|
89
86
|
console.log("currentTabRefAAA =>", a.value), e && typeof e.echo == "function" && e.echo(t);
|
|
90
87
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
88
|
+
function N() {
|
|
89
|
+
C("changeTab", a.value);
|
|
93
90
|
}
|
|
94
|
-
function
|
|
95
|
-
const e =
|
|
91
|
+
function x(t) {
|
|
92
|
+
const e = d.value[a.value];
|
|
96
93
|
e && typeof e.delFn == "function" && e.delFn(t);
|
|
97
94
|
}
|
|
98
|
-
function
|
|
99
|
-
const e =
|
|
95
|
+
function $(t) {
|
|
96
|
+
const e = d.value[a.value];
|
|
100
97
|
e && typeof e.deleteAll == "function" && e.deleteAll(t);
|
|
101
98
|
}
|
|
102
|
-
function
|
|
99
|
+
function E() {
|
|
103
100
|
r.value = !0, o.value = [], console.log("selectedData =>", o.value);
|
|
104
101
|
}
|
|
105
|
-
|
|
102
|
+
function F(t) {
|
|
103
|
+
const e = i.value.findIndex((l) => l.value === t.value);
|
|
104
|
+
if (e > -1) {
|
|
105
|
+
const l = i.value[e];
|
|
106
|
+
i.value.splice(e, 1), x(String(l.value));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return (t, e) => (f(), h(
|
|
106
110
|
"div",
|
|
107
111
|
{
|
|
108
|
-
class:
|
|
112
|
+
class: m(n(s)())
|
|
109
113
|
},
|
|
110
114
|
[
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
value:
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
},
|
|
118
|
-
suffix: d(() => [
|
|
119
|
-
s(i(ee), {
|
|
120
|
-
type: "link",
|
|
121
|
-
size: "small",
|
|
122
|
-
onClick: F
|
|
123
|
-
}, {
|
|
124
|
-
default: d(() => [...e[4] || (e[4] = [
|
|
125
|
-
H(
|
|
126
|
-
" 添加 ",
|
|
127
|
-
-1
|
|
128
|
-
/* CACHED */
|
|
129
|
-
)
|
|
130
|
-
])]),
|
|
131
|
-
_: 1
|
|
132
|
-
/* STABLE */
|
|
133
|
-
})
|
|
134
|
-
]),
|
|
135
|
-
_: 1
|
|
136
|
-
/* STABLE */
|
|
137
|
-
}, 8, ["value"])
|
|
115
|
+
c.hideSlot ? j("v-if", !0) : (f(), h("div", ie, [
|
|
116
|
+
v(n(oe), {
|
|
117
|
+
"model-value": S.value,
|
|
118
|
+
"add-text": "添加",
|
|
119
|
+
onAdd: E,
|
|
120
|
+
onClose: F
|
|
121
|
+
}, null, 8, ["model-value"])
|
|
138
122
|
])),
|
|
139
|
-
|
|
123
|
+
v(n(ne), {
|
|
140
124
|
modelValue: r.value,
|
|
141
|
-
"onUpdate:modelValue": e[
|
|
142
|
-
title:
|
|
125
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => r.value = l),
|
|
126
|
+
title: c.title,
|
|
143
127
|
width: "950px",
|
|
144
|
-
onOnConfirm:
|
|
145
|
-
onOnCancel:
|
|
128
|
+
onOnConfirm: _,
|
|
129
|
+
onOnCancel: w
|
|
146
130
|
}, {
|
|
147
|
-
default:
|
|
148
|
-
|
|
131
|
+
default: g(() => [
|
|
132
|
+
k(
|
|
149
133
|
"div",
|
|
150
134
|
{
|
|
151
|
-
class:
|
|
135
|
+
class: m(n(s)("content"))
|
|
152
136
|
},
|
|
153
137
|
[
|
|
154
|
-
|
|
138
|
+
k(
|
|
155
139
|
"div",
|
|
156
140
|
{
|
|
157
|
-
class:
|
|
158
|
-
style:
|
|
141
|
+
class: m(n(s)("left")),
|
|
142
|
+
style: G(K.value)
|
|
159
143
|
},
|
|
160
144
|
[
|
|
161
|
-
|
|
145
|
+
v(n(X), {
|
|
162
146
|
"active-key": a.value,
|
|
163
|
-
"onUpdate:activeKey": e[
|
|
164
|
-
onChange:
|
|
147
|
+
"onUpdate:activeKey": e[0] || (e[0] = (l) => a.value = l),
|
|
148
|
+
onChange: N
|
|
165
149
|
}, {
|
|
166
|
-
default:
|
|
167
|
-
(
|
|
168
|
-
|
|
150
|
+
default: g(() => [
|
|
151
|
+
(f(!0), h(
|
|
152
|
+
H,
|
|
169
153
|
null,
|
|
170
|
-
|
|
154
|
+
J(P.value, (l) => (f(), V(n(Y), {
|
|
171
155
|
key: l.key,
|
|
172
156
|
tab: l.tab
|
|
173
157
|
}, {
|
|
174
|
-
default:
|
|
175
|
-
(
|
|
176
|
-
|
|
158
|
+
default: g(() => [
|
|
159
|
+
(f(), V(
|
|
160
|
+
Q(l.component),
|
|
177
161
|
{
|
|
178
162
|
ref_for: !0,
|
|
179
|
-
ref: (
|
|
163
|
+
ref: (L) => B(L, l.key)
|
|
180
164
|
},
|
|
181
165
|
null,
|
|
182
166
|
512
|
|
@@ -197,17 +181,17 @@ const ce = { key: 0 }, Ve = /* @__PURE__ */ j({
|
|
|
197
181
|
6
|
|
198
182
|
/* CLASS, STYLE */
|
|
199
183
|
),
|
|
200
|
-
|
|
184
|
+
k(
|
|
201
185
|
"div",
|
|
202
186
|
{
|
|
203
|
-
class:
|
|
187
|
+
class: m(n(s)("right"))
|
|
204
188
|
},
|
|
205
189
|
[
|
|
206
|
-
|
|
190
|
+
v(ue, {
|
|
207
191
|
modelValue: o.value,
|
|
208
|
-
"onUpdate:modelValue": e[
|
|
209
|
-
onDelete:
|
|
210
|
-
onDeleteAll:
|
|
192
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => o.value = l),
|
|
193
|
+
onDelete: x,
|
|
194
|
+
onDeleteAll: $
|
|
211
195
|
}, null, 8, ["modelValue"])
|
|
212
196
|
],
|
|
213
197
|
2
|