@king-one/antdv 2.0.4 → 2.2.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 +12 -0
- package/dist/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/dist/es/components/index.mjs +40 -34
- package/dist/es/components/pro-cell/index.mjs +7 -0
- package/dist/es/components/pro-cell/src/index.css +1 -0
- package/dist/es/components/pro-cell/src/index.vue.mjs +7 -0
- package/dist/es/components/pro-cell/src/index.vue2.mjs +109 -0
- package/dist/es/components/pro-cell-group/index.mjs +8 -0
- package/dist/es/components/pro-cell-group/src/index.vue.mjs +41 -0
- package/dist/es/components/pro-cell-group/src/index.vue2.mjs +4 -0
- package/dist/es/components/pro-cell-group/src/types.mjs +4 -0
- package/dist/es/components/pro-form-render/index.mjs +11 -0
- package/dist/es/components/pro-form-render/src/index.vue.mjs +107 -0
- package/dist/es/components/pro-form-render/src/index.vue2.mjs +4 -0
- package/dist/es/components/pro-form-render/src/module/AioDatePicker.vue.mjs +28 -0
- package/dist/es/components/pro-form-render/src/module/AioDatePicker.vue2.mjs +4 -0
- package/dist/es/components/pro-form-render/src/module/AioInput.vue.mjs +25 -0
- package/dist/es/components/pro-form-render/src/module/AioInput.vue2.mjs +4 -0
- package/dist/es/components/pro-form-render/src/module/AioInputNumber.vue.mjs +25 -0
- package/dist/es/components/pro-form-render/src/module/AioInputNumber.vue2.mjs +4 -0
- package/dist/es/components/pro-form-render/src/module/AioListInput.css +1 -0
- package/dist/es/components/pro-form-render/src/module/AioListInput.vue.mjs +7 -0
- package/dist/es/components/pro-form-render/src/module/AioListInput.vue2.mjs +84 -0
- package/dist/es/components/pro-form-render/src/module/AioSelect.vue.mjs +53 -0
- package/dist/es/components/pro-form-render/src/module/AioSelect.vue2.mjs +4 -0
- package/dist/es/components/pro-form-render/src/module/AioSwitch.vue.mjs +24 -0
- package/dist/es/components/pro-form-render/src/module/AioSwitch.vue2.mjs +4 -0
- package/dist/es/components/pro-form-render/src/module/AioTextarea.vue.mjs +31 -0
- package/dist/es/components/pro-form-render/src/module/AioTextarea.vue2.mjs +4 -0
- package/dist/es/components/pro-form-render/src/module/AioTimePicker.vue.mjs +26 -0
- package/dist/es/components/pro-form-render/src/module/AioTimePicker.vue2.mjs +4 -0
- package/dist/es/components/pro-form-render/src/module/index.mjs +11 -0
- package/dist/es/components/pro-form-render/src/types.mjs +15 -0
- package/dist/es/components/pro-form-render/src/utils.mjs +17 -0
- package/dist/es/index.mjs +68 -53
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +1 -0
- package/dist/lib/components/index.js +1 -1
- package/dist/lib/components/pro-cell/index.js +1 -0
- package/dist/lib/components/pro-cell/src/index.css +1 -0
- package/dist/lib/components/pro-cell/src/index.vue.js +1 -0
- package/dist/lib/components/pro-cell/src/index.vue2.js +1 -0
- package/dist/lib/components/pro-cell-group/index.js +1 -0
- package/dist/lib/components/pro-cell-group/src/index.vue.js +1 -0
- package/dist/lib/components/pro-cell-group/src/index.vue2.js +1 -0
- package/dist/lib/components/pro-cell-group/src/types.js +1 -0
- package/dist/lib/components/pro-form-render/index.js +1 -0
- package/dist/lib/components/pro-form-render/src/index.vue.js +1 -0
- package/dist/lib/components/pro-form-render/src/index.vue2.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioDatePicker.vue.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioDatePicker.vue2.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioInput.vue.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioInput.vue2.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioInputNumber.vue.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioInputNumber.vue2.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioListInput.css +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioListInput.vue.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioListInput.vue2.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioSelect.vue.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioSelect.vue2.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioSwitch.vue.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioSwitch.vue2.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioTextarea.vue.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioTextarea.vue2.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioTimePicker.vue.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/AioTimePicker.vue2.js +1 -0
- package/dist/lib/components/pro-form-render/src/module/index.js +1 -0
- package/dist/lib/components/pro-form-render/src/types.js +1 -0
- package/dist/lib/components/pro-form-render/src/utils.js +1 -0
- package/dist/lib/index.js +1 -1
- package/dist/theme-chalk/fonts/iconfont.ttf +0 -0
- package/dist/theme-chalk/fonts/iconfont.woff +0 -0
- package/dist/theme-chalk/fonts/iconfont.woff2 +0 -0
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components/pro-cell/index.d.ts +294 -0
- package/dist/types/components/pro-cell/src/index.vue.d.ts +73 -0
- package/dist/types/components/pro-cell/src/types.d.ts +8 -0
- package/dist/types/components/pro-cell-group/index.d.ts +169 -0
- package/dist/types/components/pro-cell-group/src/index.vue.d.ts +28 -0
- package/dist/types/components/pro-cell-group/src/types.d.ts +17 -0
- package/dist/types/components/pro-form-render/index.d.ts +26 -0
- package/dist/types/components/pro-form-render/src/index.vue.d.ts +25 -0
- package/dist/types/components/pro-form-render/src/module/AioDatePicker.vue.d.ts +26 -0
- package/dist/types/components/pro-form-render/src/module/AioInput.vue.d.ts +26 -0
- package/dist/types/components/pro-form-render/src/module/AioInputNumber.vue.d.ts +26 -0
- package/dist/types/components/pro-form-render/src/module/AioListInput.vue.d.ts +26 -0
- package/dist/types/components/pro-form-render/src/module/AioSelect.vue.d.ts +26 -0
- package/dist/types/components/pro-form-render/src/module/AioSwitch.vue.d.ts +26 -0
- package/dist/types/components/pro-form-render/src/module/AioTextarea.vue.d.ts +26 -0
- package/dist/types/components/pro-form-render/src/module/AioTimePicker.vue.d.ts +26 -0
- package/dist/types/components/pro-form-render/src/module/index.d.ts +8 -0
- package/dist/types/components/pro-form-render/src/types.d.ts +42 -0
- package/dist/types/components/pro-form-render/src/utils.d.ts +13 -0
- package/global.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,49 +1,55 @@
|
|
|
1
1
|
import { KCollapseTranstion as t } from "./collapse-transtion/index.mjs";
|
|
2
|
-
import { KProModal as
|
|
2
|
+
import { KProModal as m } from "./pro-modal/index.mjs";
|
|
3
3
|
import { KProTitle as f } from "./pro-title/index.mjs";
|
|
4
|
-
import { KScrollBar as
|
|
4
|
+
import { KScrollBar as x } from "./scroll-bar/index.mjs";
|
|
5
5
|
import { KCoverScrollBar as P } from "./cover-scroll-bar/index.mjs";
|
|
6
6
|
import { KScaleVirtualList as i } from "./scale-virtual-list/index.mjs";
|
|
7
|
-
import { KProTag as
|
|
8
|
-
import { KProPicker as
|
|
9
|
-
import { KProArea as
|
|
10
|
-
import { KProSignature as
|
|
11
|
-
import { KProTable as
|
|
12
|
-
import { KIcon as
|
|
13
|
-
import { KProUpload as
|
|
14
|
-
import { KProContractView as
|
|
7
|
+
import { KProTag as n } from "./pro-tag/index.mjs";
|
|
8
|
+
import { KProPicker as u } from "./pro-picker/index.mjs";
|
|
9
|
+
import { KProArea as T } from "./pro-area/index.mjs";
|
|
10
|
+
import { KProSignature as d } from "./pro-signature/index.mjs";
|
|
11
|
+
import { KProTable as v } from "./pro-table/index.mjs";
|
|
12
|
+
import { KIcon as R } from "./icon/index.mjs";
|
|
13
|
+
import { KProUpload as G } from "./pro-upload/index.mjs";
|
|
14
|
+
import { KProContractView as b } from "./pro-contract-view/index.mjs";
|
|
15
15
|
import "./pro-loading/index.mjs";
|
|
16
|
-
import { KPlusUpload as
|
|
17
|
-
import { KProOverlay as
|
|
18
|
-
import { KProSign as
|
|
19
|
-
import { KUserSelector as
|
|
20
|
-
import { KProUserAvatar as
|
|
21
|
-
import { KProRoleSelector as
|
|
16
|
+
import { KPlusUpload as w } from "./plus-upload/index.mjs";
|
|
17
|
+
import { KProOverlay as D } from "./pro-overlay/index.mjs";
|
|
18
|
+
import { KProSign as I } from "./pro-sign/index.mjs";
|
|
19
|
+
import { KUserSelector as M } from "./pro-selector/index.mjs";
|
|
20
|
+
import { KProUserAvatar as h, KUserAvatar as j } from "./pro-user-avatar/index.mjs";
|
|
21
|
+
import { KProRoleSelector as z, KRoleSelector as E } from "./role-selector/index.mjs";
|
|
22
22
|
import { KDeptSelector as J } from "./dept-selector/index.mjs";
|
|
23
23
|
import { KProTagGroup as Q } from "./pro-tag-group/index.mjs";
|
|
24
|
+
import { KFormRender as X } from "./pro-form-render/index.mjs";
|
|
25
|
+
import { KCell as Z } from "./pro-cell/index.mjs";
|
|
26
|
+
import { KCellGroup as $ } from "./pro-cell-group/index.mjs";
|
|
24
27
|
export {
|
|
28
|
+
Z as KCell,
|
|
29
|
+
$ as KCellGroup,
|
|
25
30
|
t as KCollapseTranstion,
|
|
26
31
|
P as KCoverScrollBar,
|
|
27
32
|
J as KDeptSelector,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
X as KFormRender,
|
|
34
|
+
R as KIcon,
|
|
35
|
+
w as KPlusUpload,
|
|
36
|
+
T as KProArea,
|
|
37
|
+
b as KProContractView,
|
|
38
|
+
m as KProModal,
|
|
39
|
+
D as KProOverlay,
|
|
40
|
+
u as KProPicker,
|
|
41
|
+
z as KProRoleSelector,
|
|
42
|
+
I as KProSign,
|
|
43
|
+
d as KProSignature,
|
|
44
|
+
v as KProTable,
|
|
45
|
+
n as KProTag,
|
|
40
46
|
Q as KProTagGroup,
|
|
41
47
|
f as KProTitle,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
G as KProUpload,
|
|
49
|
+
h as KProUserAvatar,
|
|
50
|
+
E as KRoleSelector,
|
|
45
51
|
i as KScaleVirtualList,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
x as KScrollBar,
|
|
53
|
+
j as KUserAvatar,
|
|
54
|
+
M as KUserSelector
|
|
49
55
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.is_border[data-v-6550ad7d]{border-bottom:1px solid #e5e5e5}.is_vertical[data-v-6550ad7d]{flex-direction:column}.is_horizontal[data-v-6550ad7d]{flex-direction:row;align-items:center}.pro-cell[data-v-6550ad7d]{display:flex;line-height:32px}.pro-cell .pro-cell-label[data-v-6550ad7d]{display:flex;align-items:center}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { pushScopeId as Q, popScopeId as T, defineComponent as K, useSlots as U, inject as Y, computed as l, createElementBlock as a, openBlock as s, normalizeStyle as c, normalizeClass as q, createElementVNode as f, renderSlot as C, createCommentVNode as A, unref as b, toDisplayString as m } from "vue";
|
|
2
|
+
import { PRO_CELL_GROUP_KEY as F } from "../../pro-cell-group/src/types.mjs";
|
|
3
|
+
const H = { class: "pro-cell-label" }, Z = /* @__PURE__ */ K({
|
|
4
|
+
__name: "index",
|
|
5
|
+
props: {
|
|
6
|
+
label: {},
|
|
7
|
+
value: {},
|
|
8
|
+
isColon: { type: Boolean, default: !1 },
|
|
9
|
+
isBorder: { type: Boolean, default: !1 },
|
|
10
|
+
gap: { default: 8 },
|
|
11
|
+
border: { type: Boolean },
|
|
12
|
+
labelSize: { default: "" },
|
|
13
|
+
labelColor: { default: "" },
|
|
14
|
+
labelWeight: { default: 400 },
|
|
15
|
+
valueSize: { default: "" },
|
|
16
|
+
valueColor: { default: "" },
|
|
17
|
+
valueWeight: { default: 400 },
|
|
18
|
+
customClass: {},
|
|
19
|
+
customStyle: {},
|
|
20
|
+
direction: { default: "horizontal" },
|
|
21
|
+
colon: { type: Boolean }
|
|
22
|
+
},
|
|
23
|
+
setup(S) {
|
|
24
|
+
const e = S, n = U(), h = Y(F, {}), {
|
|
25
|
+
border: y,
|
|
26
|
+
labelSize: g,
|
|
27
|
+
labelColor: z,
|
|
28
|
+
labelWeight: x,
|
|
29
|
+
valueSize: _,
|
|
30
|
+
valueColor: W,
|
|
31
|
+
valueWeight: B,
|
|
32
|
+
customClass: k,
|
|
33
|
+
customStyle: L,
|
|
34
|
+
direction: V,
|
|
35
|
+
colon: E,
|
|
36
|
+
gap: I
|
|
37
|
+
} = h || {}, $ = l(() => e.isBorder || y || !1), D = l(() => e.labelSize || g || "14px"), i = l(() => e.labelColor || z || "#ccc"), G = l(() => e.labelWeight || x), N = l(() => e.valueSize || _ || "14px"), u = l(() => e.valueColor || W || "#333"), O = l(() => e.valueWeight || B || 400), P = l(() => e.customClass || k || ""), R = l(() => e.customStyle || L || {}), r = l(() => e.direction || V || "horizontal"), j = l(() => e.isColon || E || !1), w = l(() => e.gap || I || 12);
|
|
38
|
+
return console.log("valueColor =>", u.value), (d, J) => {
|
|
39
|
+
var o, v, t, p;
|
|
40
|
+
return s(), a(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
class: q(["pro-cell", [
|
|
44
|
+
{
|
|
45
|
+
is_border: $.value,
|
|
46
|
+
is_vertical: r.value === "vertical",
|
|
47
|
+
is_horizontal: r.value === "horizontal"
|
|
48
|
+
},
|
|
49
|
+
P.value
|
|
50
|
+
]]),
|
|
51
|
+
style: c(R.value)
|
|
52
|
+
},
|
|
53
|
+
[
|
|
54
|
+
f("div", H, [
|
|
55
|
+
(v = (o = b(n)) == null ? void 0 : o.label) != null && v.call(o) ? C(d.$slots, "label", { key: 0 }, void 0, !0) : (s(), a(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
key: 1,
|
|
59
|
+
style: c({
|
|
60
|
+
fontSize: D.value,
|
|
61
|
+
color: i.value,
|
|
62
|
+
fontWeight: G.value
|
|
63
|
+
})
|
|
64
|
+
},
|
|
65
|
+
m(e.label),
|
|
66
|
+
5
|
|
67
|
+
/* TEXT, STYLE */
|
|
68
|
+
)),
|
|
69
|
+
j.value ? (s(), a(
|
|
70
|
+
"span",
|
|
71
|
+
{
|
|
72
|
+
key: 2,
|
|
73
|
+
style: c({
|
|
74
|
+
color: i.value
|
|
75
|
+
})
|
|
76
|
+
},
|
|
77
|
+
":",
|
|
78
|
+
4
|
|
79
|
+
/* STYLE */
|
|
80
|
+
)) : A("v-if", !0)
|
|
81
|
+
]),
|
|
82
|
+
f("div", null, [
|
|
83
|
+
(p = (t = b(n)) == null ? void 0 : t.value) != null && p.call(t) ? C(d.$slots, "value", { key: 0 }, void 0, !0) : (s(), a(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
key: 1,
|
|
87
|
+
class: "pro-cell-value",
|
|
88
|
+
style: c({
|
|
89
|
+
fontSize: N.value,
|
|
90
|
+
color: u.value,
|
|
91
|
+
fontWeight: O.value,
|
|
92
|
+
paddingLeft: `${w.value}px`
|
|
93
|
+
})
|
|
94
|
+
},
|
|
95
|
+
m(e.value),
|
|
96
|
+
5
|
|
97
|
+
/* TEXT, STYLE */
|
|
98
|
+
))
|
|
99
|
+
])
|
|
100
|
+
],
|
|
101
|
+
6
|
|
102
|
+
/* CLASS, STYLE */
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
export {
|
|
108
|
+
Z as default
|
|
109
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as t, provide as a, createElementBlock as r, openBlock as i, renderSlot as c } from "vue";
|
|
2
|
+
import { PRO_CELL_GROUP_KEY as n } from "./types.mjs";
|
|
3
|
+
const m = /* @__PURE__ */ t({
|
|
4
|
+
__name: "index",
|
|
5
|
+
props: {
|
|
6
|
+
border: { type: Boolean },
|
|
7
|
+
labelSize: {},
|
|
8
|
+
labelColor: {},
|
|
9
|
+
labelWeight: {},
|
|
10
|
+
valueSize: {},
|
|
11
|
+
valueColor: {},
|
|
12
|
+
valueWeight: {},
|
|
13
|
+
customClass: {},
|
|
14
|
+
customStyle: {},
|
|
15
|
+
direction: {},
|
|
16
|
+
colon: { type: Boolean },
|
|
17
|
+
gap: {}
|
|
18
|
+
},
|
|
19
|
+
setup(l) {
|
|
20
|
+
const e = l;
|
|
21
|
+
return a(n, {
|
|
22
|
+
border: e.border || !1,
|
|
23
|
+
labelSize: e.labelSize || "14px",
|
|
24
|
+
labelColor: e.labelColor || "#ccc",
|
|
25
|
+
labelWeight: e.labelWeight || 400,
|
|
26
|
+
valueSize: e.valueSize || "14px",
|
|
27
|
+
valueColor: e.valueColor || "#333",
|
|
28
|
+
valueWeight: e.valueWeight || 400,
|
|
29
|
+
customClass: e.customClass || "",
|
|
30
|
+
customStyle: e.customStyle || {},
|
|
31
|
+
direction: e.direction || "horizontal",
|
|
32
|
+
colon: e.colon || !0,
|
|
33
|
+
gap: e.gap || 12
|
|
34
|
+
}), (o, s) => (i(), r("div", null, [
|
|
35
|
+
c(o.$slots, "default")
|
|
36
|
+
]));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
m as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { withInstall as r } from "../utils/install.mjs";
|
|
2
|
+
import "./src/index.vue2.mjs";
|
|
3
|
+
import { FormItemProps as i, FormRenderProps as f } from "./src/types.mjs";
|
|
4
|
+
import o from "./src/index.vue.mjs";
|
|
5
|
+
const p = r(o);
|
|
6
|
+
export {
|
|
7
|
+
i as FormItemProps,
|
|
8
|
+
o as FormRender,
|
|
9
|
+
f as FormRenderProps,
|
|
10
|
+
p as KFormRender
|
|
11
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent as A, ref as s, computed as I, watch as b, watchEffect as $, createBlock as u, openBlock as n, unref as c, withCtx as i, createElementBlock as F, Fragment as R, renderList as w, resolveDynamicComponent as q } from "vue";
|
|
2
|
+
import { Form as D, FormItem as E } from "ant-design-vue";
|
|
3
|
+
import { FormRenderProps as L } from "./types.mjs";
|
|
4
|
+
import "./module/index.mjs";
|
|
5
|
+
import { formatFormItems as P, getMesg as V } from "./utils.mjs";
|
|
6
|
+
import B from "./module/AioDatePicker.vue.mjs";
|
|
7
|
+
import C from "./module/AioListInput.vue.mjs";
|
|
8
|
+
import M from "./module/AioTimePicker.vue.mjs";
|
|
9
|
+
import S from "./module/AioTextarea.vue.mjs";
|
|
10
|
+
import T from "./module/AioSelect.vue.mjs";
|
|
11
|
+
import U from "./module/AioInputNumber.vue.mjs";
|
|
12
|
+
import N from "./module/AioSwitch.vue.mjs";
|
|
13
|
+
import j from "./module/AioInput.vue.mjs";
|
|
14
|
+
const te = /* @__PURE__ */ A({
|
|
15
|
+
name: "ProFormRender",
|
|
16
|
+
__name: "index",
|
|
17
|
+
props: L,
|
|
18
|
+
emits: ["change"],
|
|
19
|
+
setup(p, { expose: d, emit: g }) {
|
|
20
|
+
const a = p, _ = g, h = {
|
|
21
|
+
AioInput: j,
|
|
22
|
+
AioSwitch: N,
|
|
23
|
+
AioInputNumber: U,
|
|
24
|
+
AioSelect: T,
|
|
25
|
+
AioTextarea: S,
|
|
26
|
+
AioTimePicker: M,
|
|
27
|
+
AioListInput: C,
|
|
28
|
+
AioDatePicker: B
|
|
29
|
+
}, o = s({}), l = s(), f = I(() => a.formItems ? Array.isArray(a.formItems) ? P(a.formItems) : [] : []);
|
|
30
|
+
b(() => a.formItems, (e) => {
|
|
31
|
+
e && _("change", e);
|
|
32
|
+
}, { deep: !0 }), $(() => {
|
|
33
|
+
f.value.forEach((e) => {
|
|
34
|
+
e.key in o.value || (o.value[e.key] = e.defaultValue);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
function y(e) {
|
|
38
|
+
var m;
|
|
39
|
+
if (e.type === "AioListInput")
|
|
40
|
+
return [{ required: e.required ?? !1, message: "", trigger: ["blur", "change"] }];
|
|
41
|
+
const t = V(e), r = [
|
|
42
|
+
{ required: e.required ?? !1, message: t, trigger: ["blur", "change"] }
|
|
43
|
+
];
|
|
44
|
+
if ((m = e.properties) != null && m.regex) {
|
|
45
|
+
const x = new RegExp(e.properties.regex);
|
|
46
|
+
r.push({
|
|
47
|
+
pattern: x,
|
|
48
|
+
message: e.properties.regexMessage || "格式不正确",
|
|
49
|
+
trigger: ["blur", "change"]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return r;
|
|
53
|
+
}
|
|
54
|
+
function k(e) {
|
|
55
|
+
l.value.validate().then(() => {
|
|
56
|
+
var t;
|
|
57
|
+
(t = e.success) == null || t.call(e, o.value);
|
|
58
|
+
}).catch((t) => {
|
|
59
|
+
var r;
|
|
60
|
+
console.log("表单校验失败:", t), (r = e.error) == null || r.call(e, t);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function v() {
|
|
64
|
+
return o.value;
|
|
65
|
+
}
|
|
66
|
+
return d({
|
|
67
|
+
submit: k,
|
|
68
|
+
getFormData: v
|
|
69
|
+
}), (e, t) => (n(), u(c(D), {
|
|
70
|
+
ref_key: "formRef",
|
|
71
|
+
ref: l,
|
|
72
|
+
model: o.value,
|
|
73
|
+
"label-col": { span: 8 },
|
|
74
|
+
style: { width: "360px" }
|
|
75
|
+
}, {
|
|
76
|
+
default: i(() => [
|
|
77
|
+
(n(!0), F(
|
|
78
|
+
R,
|
|
79
|
+
null,
|
|
80
|
+
w(f.value, (r) => (n(), u(c(E), {
|
|
81
|
+
key: r.key,
|
|
82
|
+
label: r.label,
|
|
83
|
+
name: r.key,
|
|
84
|
+
rules: y(r)
|
|
85
|
+
}, {
|
|
86
|
+
default: i(() => [
|
|
87
|
+
(n(), u(q(h[r.type]), {
|
|
88
|
+
modelValue: o.value[r.key],
|
|
89
|
+
"onUpdate:modelValue": (m) => o.value[r.key] = m,
|
|
90
|
+
"form-item": r
|
|
91
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "form-item"]))
|
|
92
|
+
]),
|
|
93
|
+
_: 2
|
|
94
|
+
/* DYNAMIC */
|
|
95
|
+
}, 1032, ["label", "name", "rules"]))),
|
|
96
|
+
128
|
|
97
|
+
/* KEYED_FRAGMENT */
|
|
98
|
+
))
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
/* STABLE */
|
|
102
|
+
}, 8, ["model"]));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
te as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as a, useModel as m, createBlock as u, openBlock as p, unref as d, mergeProps as n, mergeModels as s } from "vue";
|
|
2
|
+
import { DatePicker as i } from "ant-design-vue";
|
|
3
|
+
import { FormItemProps as f } from "../types.mjs";
|
|
4
|
+
const c = "YYYY-MM-DD", D = /* @__PURE__ */ a({
|
|
5
|
+
__name: "AioDatePicker",
|
|
6
|
+
props: /* @__PURE__ */ s(f, {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(l) {
|
|
15
|
+
const e = m(l, "modelValue");
|
|
16
|
+
return (o, r) => (p(), u(d(i), n({
|
|
17
|
+
value: e.value,
|
|
18
|
+
"onUpdate:value": r[0] || (r[0] = (t) => e.value = t),
|
|
19
|
+
placeholder: o.formItem.placeholder
|
|
20
|
+
}, o.formItem.properties || {}, {
|
|
21
|
+
"value-format": c,
|
|
22
|
+
style: { width: "100%" }
|
|
23
|
+
}), null, 16, ["value", "placeholder"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
D as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as t, useModel as p, createBlock as u, openBlock as a, unref as d, mergeProps as n, mergeModels as s } from "vue";
|
|
2
|
+
import { Input as f } from "ant-design-vue";
|
|
3
|
+
import { FormItemProps as i } from "../types.mjs";
|
|
4
|
+
const V = /* @__PURE__ */ t({
|
|
5
|
+
__name: "AioInput",
|
|
6
|
+
props: /* @__PURE__ */ s(i, {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(r) {
|
|
15
|
+
const e = p(r, "modelValue");
|
|
16
|
+
return (o, l) => (a(), u(d(f), n({
|
|
17
|
+
value: e.value,
|
|
18
|
+
"onUpdate:value": l[0] || (l[0] = (m) => e.value = m),
|
|
19
|
+
placeholder: o.formItem.placeholder
|
|
20
|
+
}, o.formItem.properties || {}), null, 16, ["value", "placeholder"]));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
V as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as t, useModel as u, createBlock as p, openBlock as a, unref as d, mergeProps as n, mergeModels as s } from "vue";
|
|
2
|
+
import { InputNumber as f } from "ant-design-vue";
|
|
3
|
+
import { FormItemProps as i } from "../types.mjs";
|
|
4
|
+
const V = /* @__PURE__ */ t({
|
|
5
|
+
__name: "AioInputNumber",
|
|
6
|
+
props: /* @__PURE__ */ s(i, {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: Number,
|
|
9
|
+
default: 0
|
|
10
|
+
},
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(l) {
|
|
15
|
+
const e = u(l, "modelValue");
|
|
16
|
+
return (o, r) => (a(), p(d(f), n({
|
|
17
|
+
value: e.value,
|
|
18
|
+
"onUpdate:value": r[0] || (r[0] = (m) => e.value = m),
|
|
19
|
+
placeholder: o.formItem.placeholder
|
|
20
|
+
}, o.formItem.properties || {}, { style: { width: "100%" } }), null, 16, ["value", "placeholder"]));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
V as default
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.aio-list-input .aio-list-input-item[data-v-bc182810]{display:flex;align-items:center;justify-content:space-between}.aio-list-input .aio-list-input-item .aio-list-input-icon[data-v-bc182810]{display:flex;margin-left:12px}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { pushScopeId as v, popScopeId as h, createElementVNode as i, defineComponent as I, useModel as _, createElementBlock as p, openBlock as u, createVNode as s, Fragment as g, renderList as k, createBlock as y, unref as t, withCtx as m, mergeProps as V, mergeModels as C } from "vue";
|
|
2
|
+
import { FormItem as b, Input as B, Button as w } from "ant-design-vue";
|
|
3
|
+
import { KIcon as F } from "../../../icon/index.mjs";
|
|
4
|
+
import { FormItemProps as M } from "../types.mjs";
|
|
5
|
+
const S = (o) => (v("data-v-bc182810"), o = o(), h(), o), q = { class: "aio-list-input" }, z = { class: "aio-list-input-item" }, A = { class: "aio-list-input-icon" }, E = /* @__PURE__ */ S(() => /* @__PURE__ */ i(
|
|
6
|
+
"div",
|
|
7
|
+
{ style: { "font-size": "14px", "padding-left": "6px" } },
|
|
8
|
+
" +新增 ",
|
|
9
|
+
-1
|
|
10
|
+
/* HOISTED */
|
|
11
|
+
)), $ = /* @__PURE__ */ I({
|
|
12
|
+
__name: "AioListInput",
|
|
13
|
+
props: /* @__PURE__ */ C(M, {
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
modelModifiers: {}
|
|
19
|
+
}),
|
|
20
|
+
emits: ["update:modelValue"],
|
|
21
|
+
setup(o) {
|
|
22
|
+
const l = _(o, "modelValue");
|
|
23
|
+
function c() {
|
|
24
|
+
l.value.push({ value: "" });
|
|
25
|
+
}
|
|
26
|
+
function f(e) {
|
|
27
|
+
e !== 0 && l.value.splice(e, 1);
|
|
28
|
+
}
|
|
29
|
+
return (e, n) => (u(), p("div", q, [
|
|
30
|
+
(u(!0), p(
|
|
31
|
+
g,
|
|
32
|
+
null,
|
|
33
|
+
k(l.value, (r, a) => (u(), y(t(b), {
|
|
34
|
+
key: a,
|
|
35
|
+
label: "",
|
|
36
|
+
name: [e.formItem.key, a, "value"],
|
|
37
|
+
rules: {
|
|
38
|
+
required: e.formItem.required ?? !1,
|
|
39
|
+
message: "请输入内容",
|
|
40
|
+
trigger: "blur"
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
default: m(() => [
|
|
44
|
+
i("div", z, [
|
|
45
|
+
s(t(B), V({
|
|
46
|
+
value: r.value,
|
|
47
|
+
"onUpdate:value": (d) => r.value = d,
|
|
48
|
+
placeholder: e.formItem.placeholder,
|
|
49
|
+
ref_for: !0
|
|
50
|
+
}, e.formItem.properties || {}), null, 16, ["value", "onUpdate:value", "placeholder"]),
|
|
51
|
+
i("div", A, [
|
|
52
|
+
s(t(F), {
|
|
53
|
+
name: "guanbi",
|
|
54
|
+
color: "#f56c6c",
|
|
55
|
+
size: 24,
|
|
56
|
+
style: { cursor: "pointer" },
|
|
57
|
+
onClick: (d) => f(a)
|
|
58
|
+
}, null, 8, ["onClick"])
|
|
59
|
+
])
|
|
60
|
+
])
|
|
61
|
+
]),
|
|
62
|
+
_: 2
|
|
63
|
+
/* DYNAMIC */
|
|
64
|
+
}, 1032, ["name", "rules"]))),
|
|
65
|
+
128
|
|
66
|
+
/* KEYED_FRAGMENT */
|
|
67
|
+
)),
|
|
68
|
+
s(t(w), {
|
|
69
|
+
type: "dashed",
|
|
70
|
+
style: { width: "100%" },
|
|
71
|
+
onClick: n[0] || (n[0] = (r) => c())
|
|
72
|
+
}, {
|
|
73
|
+
default: m(() => [
|
|
74
|
+
E
|
|
75
|
+
]),
|
|
76
|
+
_: 1
|
|
77
|
+
/* STABLE */
|
|
78
|
+
})
|
|
79
|
+
]));
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
$ as default
|
|
84
|
+
};
|