@aplus-frontend/ui 0.0.27 → 0.0.28
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/es/src/ap-action/group/index.vue.mjs +27 -31
- package/es/src/ap-action/item-dropdown/index.vue.mjs +14 -15
- package/es/src/ap-action/style/item-dropdown.css +2 -0
- package/es/src/ap-form/ap-form-item-group/index.vue.mjs +21 -21
- package/es/src/ap-form/ap-form-item.vue.mjs +72 -64
- package/es/src/ap-form/ap-form.vue.d.ts +13 -3
- package/es/src/ap-form/ap-form.vue2.mjs +91 -70
- package/es/src/ap-form/constant.d.ts +1 -0
- package/es/src/ap-form/constant.mjs +2 -1
- package/es/src/ap-form/context.d.ts +4 -3
- package/es/src/ap-form/hooks/use-watch.mjs +20 -16
- package/es/src/ap-form/interface.d.ts +35 -4
- package/es/src/ap-form/items/checkbox/index.vue.mjs +11 -10
- package/es/src/ap-form/items/date/index.vue.mjs +14 -13
- package/es/src/ap-form/items/date-range/index.vue.mjs +12 -11
- package/es/src/ap-form/items/number/index.vue.mjs +13 -12
- package/es/src/ap-form/items/radio/index.vue.mjs +4 -3
- package/es/src/ap-form/items/select/index.vue.mjs +3 -2
- package/es/src/ap-form/items/switch/index.vue.mjs +9 -8
- package/es/src/ap-form/items/text/index.vue2.mjs +15 -14
- package/es/src/ap-form/items/text/password.vue.mjs +1 -0
- package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
- package/es/src/ap-form/modal-form/index.vue.d.ts +1 -1
- package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
- package/es/src/ap-table/constants.d.ts +132 -0
- package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
- package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +53 -47
- package/es/src/business/expandAlert/interface.d.ts +4 -0
- package/es/src/business/index.d.ts +38 -7
- package/es/src/business/index.mjs +1 -1
- package/es/src/editable-table/form-item.vue.mjs +72 -74
- package/es/src/locale/lang/en.mjs +2 -1
- package/es/src/locale/lang/zh-cn.mjs +2 -1
- package/es/src/theme/ap-action/item-dropdown.css +2 -0
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/style/item-dropdown.css +2 -0
- package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +13 -3
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/constant.d.ts +1 -0
- package/lib/src/ap-form/constant.js +1 -1
- package/lib/src/ap-form/context.d.ts +4 -3
- package/lib/src/ap-form/hooks/use-watch.js +1 -1
- package/lib/src/ap-form/interface.d.ts +35 -4
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +132 -0
- package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
- package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/expandAlert/interface.d.ts +4 -0
- package/lib/src/business/index.d.ts +38 -7
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-action/item-dropdown.css +2 -0
- package/package.json +4 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DownOutlined as
|
|
3
|
-
import { Alert as
|
|
4
|
-
import { ApActionItem as
|
|
1
|
+
import { defineComponent as z, ref as f, computed as v, watch as R, nextTick as S, openBlock as n, createElementBlock as i, normalizeClass as s, unref as t, createVNode as h, withCtx as d, createBlock as V, createElementVNode as c, toDisplayString as r, createCommentVNode as w, normalizeStyle as D, renderSlot as M, Fragment as x, renderList as O } from "vue";
|
|
2
|
+
import { DownOutlined as F } from "@ant-design/icons-vue";
|
|
3
|
+
import { Alert as G, Tooltip as W } from "ant-design-vue";
|
|
4
|
+
import { ApActionItem as j } from "../../ap-action/index.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
6
|
import "./style.css";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import { useGlobalConfig as
|
|
9
|
-
const
|
|
7
|
+
import { useNamespace as q } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import { useGlobalConfig as J } from "../../config-provider/hooks/use-global-config.mjs";
|
|
9
|
+
const K = { key: 0 }, P = ["onClick"], le = /* @__PURE__ */ z({
|
|
10
10
|
__name: "ApExpandAlert",
|
|
11
11
|
props: {
|
|
12
12
|
type: { default: "warning" },
|
|
@@ -14,32 +14,36 @@ const W = { key: 0 }, j = ["onClick"], _ = /* @__PURE__ */ H({
|
|
|
14
14
|
prefix: { default: "" },
|
|
15
15
|
tipTitle: { default: "查看详情" },
|
|
16
16
|
mapLabel: {},
|
|
17
|
-
separator: { default: "|" }
|
|
17
|
+
separator: { default: "|" },
|
|
18
|
+
rows: { default: 1 }
|
|
18
19
|
},
|
|
19
|
-
emits: ["choose"],
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
20
|
+
emits: ["choose", "expand"],
|
|
21
|
+
setup(g, { expose: b, emit: C }) {
|
|
22
|
+
const B = C, k = g, a = f(""), p = f(null), E = v(() => ({
|
|
22
23
|
fontWeight: "400",
|
|
23
24
|
wordBreak: "break-all",
|
|
24
25
|
overflow: "hidden",
|
|
25
26
|
display: "-webkit-box",
|
|
26
|
-
webkitLineClamp:
|
|
27
|
+
webkitLineClamp: a.value,
|
|
27
28
|
webkitBoxOrient: "vertical",
|
|
28
29
|
lineHeight: "22px"
|
|
29
30
|
}));
|
|
30
|
-
function
|
|
31
|
-
|
|
31
|
+
function N() {
|
|
32
|
+
a.value === "1" ? a.value = "" : a.value = "1", B("expand");
|
|
32
33
|
}
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const A = v(() => a.value === "1" ? "展开" : "收起"), m = f(!0), y = v(() => a.value !== "1");
|
|
35
|
+
function T(e) {
|
|
36
|
+
e ? a.value = "" : a.value = "1";
|
|
37
|
+
}
|
|
38
|
+
R(
|
|
39
|
+
() => k.data,
|
|
36
40
|
() => {
|
|
37
|
-
|
|
41
|
+
a.value = "", S(() => {
|
|
38
42
|
if (p.value) {
|
|
39
|
-
const
|
|
43
|
+
const e = Number(p.value.clientHeight), u = Number(
|
|
40
44
|
parseInt(p.value.style.lineHeight)
|
|
41
45
|
);
|
|
42
|
-
|
|
46
|
+
e < u * Number(k.rows) && y.value ? m.value = !1 : m.value = !0;
|
|
43
47
|
}
|
|
44
48
|
});
|
|
45
49
|
},
|
|
@@ -47,58 +51,60 @@ const W = { key: 0 }, j = ["onClick"], _ = /* @__PURE__ */ H({
|
|
|
47
51
|
immediate: !0
|
|
48
52
|
}
|
|
49
53
|
);
|
|
50
|
-
const { b:
|
|
51
|
-
return (
|
|
52
|
-
|
|
54
|
+
const { b: H, e: l, m: I } = q("ap-expand-alert"), L = J("uiMode", "aplus");
|
|
55
|
+
return b({
|
|
56
|
+
setExpand: T
|
|
57
|
+
}), (e, u) => (n(), i("div", {
|
|
58
|
+
class: s([t(H)(), `${t(I)(t(L))}`])
|
|
53
59
|
}, [
|
|
54
|
-
h(
|
|
55
|
-
type:
|
|
60
|
+
h(t(G), {
|
|
61
|
+
type: e.type,
|
|
56
62
|
"show-icon": "",
|
|
57
|
-
class:
|
|
63
|
+
class: s(t(l)("antAlert"))
|
|
58
64
|
}, {
|
|
59
65
|
action: d(() => [
|
|
60
|
-
m.value ? (
|
|
66
|
+
m.value ? (n(), V(t(j), {
|
|
61
67
|
key: 0,
|
|
62
68
|
size: "small",
|
|
63
|
-
onClick: u[0] || (u[0] = (
|
|
69
|
+
onClick: u[0] || (u[0] = (o) => N()),
|
|
64
70
|
style: { "font-size": "12px", "padding-left": "16px" }
|
|
65
71
|
}, {
|
|
66
72
|
default: d(() => [
|
|
67
73
|
c("span", {
|
|
68
|
-
class:
|
|
69
|
-
}, r(
|
|
70
|
-
h(
|
|
71
|
-
class:
|
|
74
|
+
class: s(t(l)("expandText"))
|
|
75
|
+
}, r(A.value), 3),
|
|
76
|
+
h(t(F), {
|
|
77
|
+
class: s(y.value ? t(l)("expandIcon") : t(l)("collapseIcon"))
|
|
72
78
|
}, null, 8, ["class"])
|
|
73
79
|
]),
|
|
74
80
|
_: 1
|
|
75
|
-
})) :
|
|
81
|
+
})) : w("", !0)
|
|
76
82
|
]),
|
|
77
83
|
message: d(() => [
|
|
78
84
|
c("div", {
|
|
79
|
-
style:
|
|
80
|
-
class:
|
|
85
|
+
style: D(E.value),
|
|
86
|
+
class: s(t(l)("alertContent")),
|
|
81
87
|
ref_key: "ellipsisBoxRef",
|
|
82
88
|
ref: p
|
|
83
89
|
}, [
|
|
84
|
-
|
|
90
|
+
M(e.$slots, "default", {}, () => [
|
|
85
91
|
c("span", {
|
|
86
|
-
class:
|
|
87
|
-
}, r(
|
|
88
|
-
typeof
|
|
89
|
-
h(
|
|
92
|
+
class: s(t(l)("prefix"))
|
|
93
|
+
}, r(e.prefix), 3),
|
|
94
|
+
typeof e.data == "string" ? (n(), i("span", K, r(e.data), 1)) : (n(!0), i(x, { key: 1 }, O(e.data, (o, $) => (n(), i(x, { key: o }, [
|
|
95
|
+
h(t(W), { title: e.tipTitle }, {
|
|
90
96
|
default: d(() => [
|
|
91
97
|
c("span", {
|
|
92
|
-
class:
|
|
93
|
-
onClick: (
|
|
94
|
-
}, r(
|
|
98
|
+
class: s(t(l)("showItem")),
|
|
99
|
+
onClick: (Q) => e.$emit("choose", o)
|
|
100
|
+
}, r(e.mapLabel ? o[e.mapLabel] : o), 11, P)
|
|
95
101
|
]),
|
|
96
102
|
_: 2
|
|
97
103
|
}, 1032, ["title"]),
|
|
98
|
-
|
|
104
|
+
$ !== e.data.length - 1 ? (n(), i("span", {
|
|
99
105
|
key: 0,
|
|
100
|
-
class:
|
|
101
|
-
}, r(
|
|
106
|
+
class: s(t(l)("spliter"))
|
|
107
|
+
}, r(e.separator), 3)) : w("", !0)
|
|
102
108
|
], 64))), 128))
|
|
103
109
|
])
|
|
104
110
|
], 6)
|
|
@@ -109,5 +115,5 @@ const W = { key: 0 }, j = ["onClick"], _ = /* @__PURE__ */ H({
|
|
|
109
115
|
}
|
|
110
116
|
});
|
|
111
117
|
export {
|
|
112
|
-
|
|
118
|
+
le as default
|
|
113
119
|
};
|
|
@@ -171,6 +171,11 @@ export declare const ApExpandAlert: {
|
|
|
171
171
|
required: true;
|
|
172
172
|
default: string;
|
|
173
173
|
};
|
|
174
|
+
rows: {
|
|
175
|
+
type: PropType<string | number>;
|
|
176
|
+
required: true;
|
|
177
|
+
default: number;
|
|
178
|
+
};
|
|
174
179
|
tipTitle: {
|
|
175
180
|
type: PropType<string>;
|
|
176
181
|
default: string;
|
|
@@ -179,8 +184,12 @@ export declare const ApExpandAlert: {
|
|
|
179
184
|
type: PropType<string>;
|
|
180
185
|
};
|
|
181
186
|
}>> & {
|
|
187
|
+
onExpand?: ((...args: any[]) => any) | undefined;
|
|
182
188
|
onChoose?: ((...args: any[]) => any) | undefined;
|
|
183
|
-
}, {
|
|
189
|
+
}, {
|
|
190
|
+
setExpand: (state?: boolean | undefined) => void;
|
|
191
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
192
|
+
expand: (...args: any[]) => void;
|
|
184
193
|
choose: (...args: any[]) => void;
|
|
185
194
|
}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
186
195
|
type: {
|
|
@@ -202,6 +211,11 @@ export declare const ApExpandAlert: {
|
|
|
202
211
|
required: true;
|
|
203
212
|
default: string;
|
|
204
213
|
};
|
|
214
|
+
rows: {
|
|
215
|
+
type: PropType<string | number>;
|
|
216
|
+
required: true;
|
|
217
|
+
default: number;
|
|
218
|
+
};
|
|
205
219
|
tipTitle: {
|
|
206
220
|
type: PropType<string>;
|
|
207
221
|
default: string;
|
|
@@ -210,12 +224,14 @@ export declare const ApExpandAlert: {
|
|
|
210
224
|
type: PropType<string>;
|
|
211
225
|
};
|
|
212
226
|
}>> & {
|
|
227
|
+
onExpand?: ((...args: any[]) => any) | undefined;
|
|
213
228
|
onChoose?: ((...args: any[]) => any) | undefined;
|
|
214
229
|
}, {
|
|
215
230
|
type: "success" | "error" | "info" | "warning" | undefined;
|
|
216
231
|
data: string | any[];
|
|
217
232
|
prefix: string;
|
|
218
233
|
separator: string;
|
|
234
|
+
rows: string | number;
|
|
219
235
|
tipTitle: string;
|
|
220
236
|
}, true, {}, {}, {
|
|
221
237
|
P: {};
|
|
@@ -244,6 +260,11 @@ export declare const ApExpandAlert: {
|
|
|
244
260
|
required: true;
|
|
245
261
|
default: string;
|
|
246
262
|
};
|
|
263
|
+
rows: {
|
|
264
|
+
type: PropType<string | number>;
|
|
265
|
+
required: true;
|
|
266
|
+
default: number;
|
|
267
|
+
};
|
|
247
268
|
tipTitle: {
|
|
248
269
|
type: PropType<string>;
|
|
249
270
|
default: string;
|
|
@@ -252,12 +273,16 @@ export declare const ApExpandAlert: {
|
|
|
252
273
|
type: PropType<string>;
|
|
253
274
|
};
|
|
254
275
|
}>> & {
|
|
276
|
+
onExpand?: ((...args: any[]) => any) | undefined;
|
|
255
277
|
onChoose?: ((...args: any[]) => any) | undefined;
|
|
256
|
-
}, {
|
|
278
|
+
}, {
|
|
279
|
+
setExpand: (state?: boolean | undefined) => void;
|
|
280
|
+
}, {}, {}, {}, {
|
|
257
281
|
type: "success" | "error" | "info" | "warning" | undefined;
|
|
258
282
|
data: string | any[];
|
|
259
283
|
prefix: string;
|
|
260
284
|
separator: string;
|
|
285
|
+
rows: string | number;
|
|
261
286
|
tipTitle: string;
|
|
262
287
|
}>;
|
|
263
288
|
__isFragment?: undefined;
|
|
@@ -283,6 +308,11 @@ export declare const ApExpandAlert: {
|
|
|
283
308
|
required: true;
|
|
284
309
|
default: string;
|
|
285
310
|
};
|
|
311
|
+
rows: {
|
|
312
|
+
type: PropType<string | number>;
|
|
313
|
+
required: true;
|
|
314
|
+
default: number;
|
|
315
|
+
};
|
|
286
316
|
tipTitle: {
|
|
287
317
|
type: PropType<string>;
|
|
288
318
|
default: string;
|
|
@@ -291,23 +321,24 @@ export declare const ApExpandAlert: {
|
|
|
291
321
|
type: PropType<string>;
|
|
292
322
|
};
|
|
293
323
|
}>> & {
|
|
324
|
+
onExpand?: ((...args: any[]) => any) | undefined;
|
|
294
325
|
onChoose?: ((...args: any[]) => any) | undefined;
|
|
295
|
-
}, {
|
|
326
|
+
}, {
|
|
327
|
+
setExpand: (state?: boolean | undefined) => void;
|
|
328
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
329
|
+
expand: (...args: any[]) => void;
|
|
296
330
|
choose: (...args: any[]) => void;
|
|
297
331
|
}, string, {
|
|
298
332
|
type: "success" | "error" | "info" | "warning" | undefined;
|
|
299
333
|
data: string | any[];
|
|
300
334
|
prefix: string;
|
|
301
335
|
separator: string;
|
|
336
|
+
rows: string | number;
|
|
302
337
|
tipTitle: string;
|
|
303
338
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
304
339
|
$slots: {
|
|
305
340
|
default?(_: {}): any;
|
|
306
341
|
};
|
|
307
|
-
}) & Plugin<any[]> & (new (...args: any[]) => {
|
|
308
|
-
$props: {
|
|
309
|
-
onClick?: (() => void) | undefined;
|
|
310
|
-
};
|
|
311
342
|
});
|
|
312
343
|
export declare const ApLabel: {
|
|
313
344
|
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
@@ -9,7 +9,7 @@ import m from "./expandAlert/ApExpandAlert.vue2.mjs";
|
|
|
9
9
|
import r from "./ap-label/ApLabel.vue2.mjs";
|
|
10
10
|
import p from "./ap-status/ApStatus.vue2.mjs";
|
|
11
11
|
import i from "./ap-status/ApStatusGroup.vue2.mjs";
|
|
12
|
-
const x = t(o), S =
|
|
12
|
+
const x = t(o), S = m, b = t(r), d = t(p), h = t(i);
|
|
13
13
|
export {
|
|
14
14
|
S as ApExpandAlert,
|
|
15
15
|
b as ApLabel,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Table as
|
|
3
|
-
import { ApForm as
|
|
4
|
-
import { isNumber as
|
|
1
|
+
import { defineComponent as P, ref as V, unref as o, useSlots as A, watch as O, openBlock as x, createBlock as T, mergeProps as C, withCtx as m, createVNode as K, createSlots as M, createElementBlock as q, Fragment as G, createElementVNode as w, normalizeClass as H, toDisplayString as W, createCommentVNode as I, renderList as U, renderSlot as $, normalizeProps as J, guardReactiveProps as Q } from "vue";
|
|
2
|
+
import { Table as X } from "ant-design-vue";
|
|
3
|
+
import { ApForm as b } from "../ap-form/index.mjs";
|
|
4
|
+
import { isNumber as u, cloneDeep as i, omit as Y } from "lodash-unified";
|
|
5
5
|
import "../config-provider/index.mjs";
|
|
6
|
-
import { useInjectForm as
|
|
6
|
+
import { useInjectForm as Z } from "../ap-form/context.mjs";
|
|
7
7
|
import "./style/index.css";
|
|
8
|
-
import { isDef as
|
|
9
|
-
import
|
|
8
|
+
import { isDef as f } from "../utils/index.mjs";
|
|
9
|
+
import ee from "./hooks/use-get-columns.mjs";
|
|
10
10
|
import { getColumnIsRequired as oe } from "./utils.mjs";
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
import { useGlobalConfig as
|
|
13
|
-
const
|
|
11
|
+
import { useNamespace as te } from "../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import { useGlobalConfig as ae } from "../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
const ge = /* @__PURE__ */ P({
|
|
14
14
|
name: "EditableTableInner",
|
|
15
15
|
__name: "form-item",
|
|
16
16
|
props: {
|
|
@@ -110,95 +110,93 @@ const xe = /* @__PURE__ */ V({
|
|
|
110
110
|
default: () => ({})
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
-
setup(
|
|
114
|
-
expose:
|
|
113
|
+
setup(y, {
|
|
114
|
+
expose: R
|
|
115
115
|
}) {
|
|
116
|
-
var
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
model:
|
|
120
|
-
} =
|
|
121
|
-
|
|
122
|
-
var
|
|
123
|
-
|
|
116
|
+
var c;
|
|
117
|
+
const a = y, {
|
|
118
|
+
internalInstance: l,
|
|
119
|
+
model: B
|
|
120
|
+
} = Z(), r = V(((c = o(B)) == null ? void 0 : c[a.name]) || []), D = A(), F = b.useWatch(a.name);
|
|
121
|
+
O(() => F.value, (e) => {
|
|
122
|
+
var t;
|
|
123
|
+
r.value = e, (t = a.onChange) == null || t.call(a, e);
|
|
124
124
|
});
|
|
125
125
|
const {
|
|
126
|
-
b:
|
|
127
|
-
em:
|
|
128
|
-
} =
|
|
129
|
-
function
|
|
130
|
-
var
|
|
131
|
-
const n = ((
|
|
132
|
-
if (
|
|
126
|
+
b: p,
|
|
127
|
+
em: E
|
|
128
|
+
} = te("editable-table"), L = ae("uiMode", "aplus"), v = ee(a);
|
|
129
|
+
function N(e, t) {
|
|
130
|
+
var s;
|
|
131
|
+
const n = ((s = o(r)) == null ? void 0 : s.length) || 0;
|
|
132
|
+
if (f(a.maxLength) && n >= a.maxLength)
|
|
133
133
|
return;
|
|
134
|
-
const
|
|
135
|
-
|
|
134
|
+
const d = [...o(r) || []];
|
|
135
|
+
f(t) ? d.splice(t, 0, {
|
|
136
136
|
...e || {}
|
|
137
|
-
}) :
|
|
137
|
+
}) : d.push({
|
|
138
138
|
...e || {}
|
|
139
|
-
}),
|
|
139
|
+
}), l == null || l.setFieldValue(a.name, [...o(r) || [], e || {}]);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
var g
|
|
143
|
-
const n = ((g = o(
|
|
144
|
-
if (
|
|
141
|
+
function S(e, t = "suffix") {
|
|
142
|
+
var g;
|
|
143
|
+
const n = ((g = o(r)) == null ? void 0 : g.length) || 0, d = u(e) ? e : e.length;
|
|
144
|
+
if (f(a.maxLength) && n + d > a.maxLength)
|
|
145
145
|
return;
|
|
146
|
-
const
|
|
147
|
-
|
|
146
|
+
const s = [...o(r) || []], h = u(e) ? new Array(e).fill({}) : i(e);
|
|
147
|
+
t === "suffix" ? s.push(...h) : s.unshift(...h), l == null || l.setFieldValue(a.name, s);
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
a = a.filter((u, s) => !n.includes(s)), (r = t == null ? void 0 : t.setFieldValue) == null || r.call(t, l.name, a);
|
|
149
|
+
function k(e) {
|
|
150
|
+
let t = i(o(r) || []);
|
|
151
|
+
const n = u(e) ? [e] : e;
|
|
152
|
+
t = t.filter((d, s) => !n.includes(s)), l == null || l.setFieldValue(a.name, t);
|
|
154
153
|
}
|
|
155
|
-
function
|
|
156
|
-
return o(
|
|
154
|
+
function _() {
|
|
155
|
+
return o(r);
|
|
157
156
|
}
|
|
158
|
-
function
|
|
159
|
-
var
|
|
160
|
-
return (
|
|
157
|
+
function j(e) {
|
|
158
|
+
var t;
|
|
159
|
+
return (t = o(r)) == null ? void 0 : t[e];
|
|
161
160
|
}
|
|
162
|
-
function
|
|
163
|
-
|
|
164
|
-
const n = p(o(d));
|
|
161
|
+
function z(e, t) {
|
|
162
|
+
const n = i(o(r));
|
|
165
163
|
n[e] && (n[e] = {
|
|
166
164
|
...n[e],
|
|
167
|
-
...
|
|
168
|
-
},
|
|
165
|
+
...t
|
|
166
|
+
}, l == null || l.setFieldValue(a.name, [...n]));
|
|
169
167
|
}
|
|
170
|
-
return
|
|
171
|
-
add:
|
|
172
|
-
remove:
|
|
173
|
-
getRowData:
|
|
174
|
-
getRowsData:
|
|
175
|
-
setRowData:
|
|
176
|
-
addMultiple:
|
|
177
|
-
}), (e,
|
|
168
|
+
return R({
|
|
169
|
+
add: N,
|
|
170
|
+
remove: k,
|
|
171
|
+
getRowData: j,
|
|
172
|
+
getRowsData: _,
|
|
173
|
+
setRowData: z,
|
|
174
|
+
addMultiple: S
|
|
175
|
+
}), (e, t) => (x(), T(o(b).FormItem, C(e.formItem, {
|
|
178
176
|
name: e.name,
|
|
179
177
|
label: e.label
|
|
180
178
|
}), {
|
|
181
|
-
default:
|
|
182
|
-
class: [o(
|
|
183
|
-
columns: o(
|
|
184
|
-
"data-source":
|
|
185
|
-
}),
|
|
186
|
-
headerCell:
|
|
179
|
+
default: m(() => [K(o(X), C(o(Y)(a, ["name", "maxLength"]), {
|
|
180
|
+
class: [o(p)(), o(L) === "admin" ? o(p)("admin") : null],
|
|
181
|
+
columns: o(v),
|
|
182
|
+
"data-source": r.value
|
|
183
|
+
}), M({
|
|
184
|
+
headerCell: m(({
|
|
187
185
|
column: n
|
|
188
|
-
}) => [o(oe)(n) ? (
|
|
186
|
+
}) => [o(oe)(n) ? (x(), q(G, {
|
|
189
187
|
key: 0
|
|
190
|
-
}, [
|
|
191
|
-
class:
|
|
192
|
-
}, "*", 2),
|
|
188
|
+
}, [w("span", {
|
|
189
|
+
class: H(o(E)("header-cell", "required"))
|
|
190
|
+
}, "*", 2), w("span", null, W(n.title), 1)], 64)) : I("", !0)]),
|
|
193
191
|
_: 2
|
|
194
|
-
}, [
|
|
195
|
-
name:
|
|
196
|
-
fn:
|
|
192
|
+
}, [U(D, (n, d) => ({
|
|
193
|
+
name: d,
|
|
194
|
+
fn: m((s) => [$(e.$slots, d, J(Q(s || {})))])
|
|
197
195
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
198
196
|
_: 3
|
|
199
197
|
}, 16, ["name", "label"]));
|
|
200
198
|
}
|
|
201
199
|
});
|
|
202
200
|
export {
|
|
203
|
-
|
|
201
|
+
ge as default
|
|
204
202
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("ant-design-vue");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");require("../item-dropdown/index.vue2.js");require("../../config-provider/index.js");const _=require("lodash-unified"),f=require("../../config-provider/hooks/use-locale.js"),c=require("../item-dropdown/index.vue.js"),d=require("../item-modal/index.vue.js"),g=require("../item-popconfirm/index.vue.js"),m=require("../item/index.vue2.js"),k=e.defineComponent({name:"ApActionGroup",__name:"index",props:{count:{default:3},trigger:{default:()=>["hover"]},placement:{default:"bottomRight"},actions:{default:()=>[]}},setup(l){const o=l,{t:s}=f.useLocale(),n=e.computed(()=>o.actions.filter(t=>t.visible||_.isUndefined(t.visible))),i=e.computed(()=>e.unref(n).length>o.count),u=e.computed(()=>{const t=e.unref(n);return t.length<=o.count?{showActions:t,menuActions:[]}:{showActions:t.slice(0,o.count-1),menuActions:t.slice(o.count-1)}});return(t,v)=>(e.openBlock(),e.createBlock(e.unref(p.Space),{size:16,align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.showActions,(r,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[r.actions?(e.openBlock(),e.createBlock(c.default,e.mergeProps({key:0,ref_for:!0},r),null,16)):r.modalProps?(e.openBlock(),e.createBlock(d.default,e.mergeProps({key:1,ref_for:!0},r),null,16)):r.popconfirmProps?(e.openBlock(),e.createBlock(g.default,e.mergeProps({key:2,ref_for:!0},r),null,16)):(e.openBlock(),e.createBlock(m.default,e.mergeProps({key:3,ref_for:!0},r),null,16))],64))),128)),i.value?(e.openBlock(),e.createBlock(c.default,{key:0,actions:u.value.menuActions,placement:t.placement,trigger:t.trigger,text:e.unref(s)("ap.common.more")},null,8,["actions","placement","trigger","text"])):e.createCommentVNode("",!0)]),_:1}))}});exports.default=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue")
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");const f=require("@aplus-frontend/icon");require("../../config-provider/index.js");const s=require("lodash-unified");require("../style/item-dropdown.css");const m=require("../../config-provider/hooks/use-namespace.js"),_=require("../item-modal/index.vue.js"),g=require("../item-popconfirm/index.vue.js"),i=require("../item/index.vue2.js"),k=e.defineComponent({name:"ApActionItemDropDown",__name:"index",props:{trigger:{default:()=>["hover"]},placement:{default:"bottomLeft"},actions:{default:()=>[]},showIcon:{type:Boolean,default:!0},text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onClick:{},loading:{type:Boolean,default:!1}},setup(c){const a=c,n=e.ref(!1),{e:l}=m.useNamespace("action-item-dropdown"),p=e.computed(()=>a.actions.filter(r=>r.visible||s.isUndefined(r.visible)).map(r=>({...r,onAction:async o=>{var t;try{await((t=r.onAction)==null?void 0:t.call(r,o))}finally{n.value=!1}}})));return(r,o)=>(e.openBlock(),e.createBlock(e.unref(u.Dropdown),{open:n.value,"onUpdate:open":o[0]||(o[0]=t=>n.value=t),trigger:r.trigger,placement:r.placement},{overlay:e.withCtx(()=>[e.createVNode(e.unref(u.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(t,d)=>(e.openBlock(),e.createBlock(e.unref(u.MenuItem),{key:d,class:e.normalizeClass(e.unref(l)("item"))},{default:e.withCtx(()=>[t.modalProps?(e.openBlock(),e.createBlock(_.default,e.mergeProps({key:0,ref_for:!0},t),null,16)):t.popconfirmProps?(e.openBlock(),e.createBlock(g.default,e.mergeProps({key:1,ref_for:!0},t),null,16)):(e.openBlock(),e.createBlock(i.default,e.mergeProps({key:2,ref_for:!0},t),null,16))]),_:2},1032,["class"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("wrapper"))},[e.createVNode(i.default,e.normalizeProps(e.guardReactiveProps(e.unref(s.omit)(a,["actions","trigger","placement"]))),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},16),r.showIcon?(e.openBlock(),e.createBlock(e.unref(f.IconApAdLineDown),{key:0,class:e.normalizeClass(e.unref(l)("icon"))},null,8,["class"])):e.createCommentVNode("",!0)],2)]),_:3},8,["open","trigger","placement"]))}});exports.default=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("ant-design-vue"),C=require("lodash-unified"),h=require("../constant.js"),u=require("./helper.js");require("../../config-provider/index.js");require("../style/ap-form-item-group.css");const k=require("../../config-provider/hooks/use-namespace.js");function
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("ant-design-vue"),C=require("lodash-unified"),h=require("../constant.js"),u=require("./helper.js");require("../../config-provider/index.js");require("../style/ap-form-item-group.css");const k=require("../../config-provider/hooks/use-namespace.js");function w(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!e.isVNode(r)}const y=e.defineComponent({name:"ApFormItemGroup",__name:"index",props:{align:{},justify:{},prefixCls:{},gutter:{default:16},wrap:{type:Boolean,default:void 0},countPerRow:{default:3}},setup(r){const{b:l}=k.useNamespace("ap-form-item-group"),{countPerRow:p,...d}=r,a=e.useSlots();e.watch(()=>a.default(),t=>{s.value=u.genRealChildren(t)}),e.onBeforeUpdate(()=>{s.value=u.genRealChildren(a.default())});const s=e.shallowRef(u.genRealChildren(a.default())),f=e.computed(()=>e.unref(s).map((t,c)=>{const o=t.props,n=C.pick(o,h.apFormItemColPropKeys),m=n!=null&&n.span?{}:u.buildColSpan(p),g=!!(o!=null&&o.hidden);return e.createVNode(i.Col,e.mergeProps({key:`${c}-${Date.now()}`},m,n,{class:g?l("col-hidden"):""}),w(t)?t:{default:()=>[t]})}));return(t,c)=>(e.openBlock(),e.createBlock(e.unref(i.Row),e.mergeProps({class:e.unref(l)()},d),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,n)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{key:`${n}-${Date.now()}`}))),128))]),_:1},16,["class"]))}});exports.default=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("ant-design-vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("ant-design-vue"),w=require("ant-design-vue/es/theme/internal"),c=require("lodash-unified"),z=require("./constant.js"),A=require("@ant-design/icons-vue");require("../config-provider/index.js");const R=require("./context.js");require("./style/ap-form-item.css");const j=require("../config-provider/hooks/use-namespace.js"),D=e.defineComponent({name:"ApFormItem",__name:"ap-form-item",props:{htmlFor:{},prefixCls:{},label:{},help:{},extra:{},labelCol:{},wrapperCol:{},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:{},prop:{},name:{},rules:{},autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:{},validateTrigger:{},messageVariables:{},hidden:{type:Boolean},noStyle:{type:Boolean},tooltip:{},span:{},order:{},offset:{},push:{},pull:{},xs:{},sm:{},md:{},lg:{},xl:{},xxl:{},flex:{},bordered:{type:Boolean,default:!1},valuePropName:{default:"value"},initialValue:{}},setup(B,{expose:C}){var y,F;const t=B,r=e.useSlots(),{model:u,updateModel:i,internalInstance:s}=R.useInjectForm(),{m:f,b:g}=j.useNamespace("ap-form-item"),d=e.ref(!1),n=e.ref(),[,V]=w.useToken();e.onMounted(()=>{s==null||s.registerField({name:t.name,initialValue:t.initialValue})});const m=e.computed(()=>t.name?c.isArray(t.name)?t.name.reduce((o,l)=>o==null?void 0:o[l],e.unref(u)):u==null?void 0:u.value[t.name]:null),p=e.ref((F=(y=r.default)==null?void 0:y.call(r))==null?void 0:F[0]);e.watch(()=>{var o;return(o=r.default)==null?void 0:o.call(r)},o=>{p.value=o==null?void 0:o[0]});function k(o){i==null||i(t.name,o)}function q(){d.value=!0}function N(){d.value=!1}const v=e.computed(()=>{var l,a;if(!t.name)return(l=r.default())==null?void 0:l[0];const o=e.unref(p);return o?e.cloneVNode(o,{[t.valuePropName]:e.unref(m),[`onUpdate:${t.valuePropName}`]:k,bordered:t.bordered?!1:(a=o==null?void 0:o.props)==null?void 0:a.bordered,onFocus:q,onBlur:N}):null});function x(){var o;(o=n.value)==null||o.onFieldBlur()}function P(){var o;(o=n.value)==null||o.onFieldChange()}function S(){var o;(o=n.value)==null||o.clearValidate()}function _(){var o;(o=n.value)==null||o.resetField()}function I(){return e.unref(m)}return C({onFieldBlur:x,onFieldChange:P,clearValidate:S,resetField:_,getFieldValue:I}),(o,l)=>(e.openBlock(),e.createBlock(e.unref(h.Form).Item,e.mergeProps({ref_key:"formItemRef",ref:n},e.unref(c.omit)(t,[...e.unref(z.apFormItemColPropKeys),"tooltip"]),{class:{[e.unref(f)("bordered")]:o.bordered,[e.unref(f)("focused")]:o.bordered&&d.value,[e.unref(g)()]:!0},colon:o.bordered?!1:t.colon}),e.createSlots({default:e.withCtx(()=>[v.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:0})):e.createCommentVNode("",!0)]),_:2},[t.tooltip?{name:"tooltip",fn:e.withCtx(({class:a})=>[e.createElementVNode("span",{class:e.normalizeClass(a)},[e.createVNode(e.unref(h.Tooltip),{title:t.tooltip},{default:e.withCtx(()=>[e.createVNode(e.unref(A.QuestionCircleOutlined),{style:e.normalizeStyle({color:e.unref(V).colorPrimary})},null,8,["style"])]),_:1},8,["title"])],2)]),key:"0"}:void 0,e.renderList(e.unref(c.omit)(r,"default"),(a,b)=>({name:b,fn:e.withCtx(T=>[e.renderSlot(o.$slots,b,e.normalizeProps(e.guardReactiveProps(T||{})))])}))]),1040,["class","colon"]))}});exports.default=D;
|