@king-one/form-antdv 0.0.1
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 +28 -0
- package/dist/es/index.mjs +4 -0
- package/dist/es/src/components/ArrayCard/array-card.vue.mjs +4 -0
- package/dist/es/src/components/ArrayCard/array-card.vue2.mjs +121 -0
- package/dist/es/src/components/ArrayCard/index.mjs +11 -0
- package/dist/es/src/components/ArrayTable/array-table.vue.mjs +4 -0
- package/dist/es/src/components/ArrayTable/array-table.vue2.mjs +111 -0
- package/dist/es/src/components/ArrayTable/index.mjs +11 -0
- package/dist/es/src/components/DateRange/index.mjs +10 -0
- package/dist/es/src/components/FormArea/form-area.vue.mjs +4 -0
- package/dist/es/src/components/FormArea/form-area.vue2.mjs +70 -0
- package/dist/es/src/components/FormArea/index.mjs +9 -0
- package/dist/es/src/components/Input/index.mjs +10 -0
- package/dist/es/src/components/InputNumber/index.mjs +10 -0
- package/dist/es/src/components/Select/index.mjs +13 -0
- package/dist/es/src/hooks/index.mjs +7 -0
- package/dist/es/src/hooks/use-namespace/index.mjs +49 -0
- package/dist/es/src/index.mjs +17 -0
- package/dist/es/src/internal.mjs +9 -0
- package/dist/es/src/style/index.mjs +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/src/components/ArrayCard/array-card.vue.js +1 -0
- package/dist/lib/src/components/ArrayCard/array-card.vue2.js +1 -0
- package/dist/lib/src/components/ArrayCard/index.js +1 -0
- package/dist/lib/src/components/ArrayTable/array-table.vue.js +1 -0
- package/dist/lib/src/components/ArrayTable/array-table.vue2.js +1 -0
- package/dist/lib/src/components/ArrayTable/index.js +1 -0
- package/dist/lib/src/components/DateRange/index.js +1 -0
- package/dist/lib/src/components/FormArea/form-area.vue.js +1 -0
- package/dist/lib/src/components/FormArea/form-area.vue2.js +1 -0
- package/dist/lib/src/components/FormArea/index.js +1 -0
- package/dist/lib/src/components/Input/index.js +1 -0
- package/dist/lib/src/components/InputNumber/index.js +1 -0
- package/dist/lib/src/components/Select/index.js +1 -0
- package/dist/lib/src/hooks/index.js +1 -0
- package/dist/lib/src/hooks/use-namespace/index.js +1 -0
- package/dist/lib/src/index.js +1 -0
- package/dist/lib/src/internal.js +1 -0
- package/dist/lib/src/style/index.js +1 -0
- package/dist/theme-chalk/base.css +1 -0
- package/dist/theme-chalk/form-antdv.css +1 -0
- package/dist/theme-chalk/index.css +1 -0
- package/dist/theme-chalk/var.css +0 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/src/components/ArrayCard/array-card.vue.d.ts +25 -0
- package/dist/types/src/components/ArrayCard/index.d.ts +7 -0
- package/dist/types/src/components/ArrayTable/array-table.vue.d.ts +25 -0
- package/dist/types/src/components/ArrayTable/index.d.ts +7 -0
- package/dist/types/src/components/DateRange/index.d.ts +7 -0
- package/dist/types/src/components/FormArea/form-area.vue.d.ts +26 -0
- package/dist/types/src/components/FormArea/index.d.ts +7 -0
- package/dist/types/src/components/Input/index.d.ts +7 -0
- package/dist/types/src/components/InputNumber/index.d.ts +7 -0
- package/dist/types/src/components/Select/index.d.ts +7 -0
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/use-namespace/index.d.ts +23 -0
- package/dist/types/src/index.d.ts +7 -0
- package/dist/types/src/internal.d.ts +2 -0
- package/package.json +58 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @king-one/form-antdv
|
|
2
|
+
|
|
3
|
+
## 0.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat:发布
|
|
8
|
+
|
|
9
|
+
## 0.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @king-one/form-render@0.0.3
|
|
15
|
+
|
|
16
|
+
## 0.0.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @king-one/form-render@0.0.2
|
|
22
|
+
|
|
23
|
+
## 0.0.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- @king-one/form-render@0.0.1
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { defineComponent as w, mergeModels as B, useModel as E, computed as h, toRaw as N, openBlock as a, createElementBlock as p, normalizeClass as F, unref as n, createBlock as v, withCtx as u, createElementVNode as s, toDisplayString as f, createVNode as g, Fragment as k, renderList as C, createTextVNode as M } from "vue";
|
|
2
|
+
import { Card as b, Empty as S, Button as V } from "ant-design-vue";
|
|
3
|
+
import "../../internal.mjs";
|
|
4
|
+
import { useNamespace as j } from "../../hooks/use-namespace/index.mjs";
|
|
5
|
+
import { useInjectFieldContext as A, RecursionField as I } from "@king-one/form-render";
|
|
6
|
+
const T = /* @__PURE__ */ w({
|
|
7
|
+
__name: "array-card",
|
|
8
|
+
props: /* @__PURE__ */ B({
|
|
9
|
+
title: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "默认标题"
|
|
12
|
+
}
|
|
13
|
+
}, {
|
|
14
|
+
value: {},
|
|
15
|
+
valueModifiers: {}
|
|
16
|
+
}),
|
|
17
|
+
emits: ["update:value"],
|
|
18
|
+
setup(i) {
|
|
19
|
+
const _ = j("ArrayCard"), e = A(), r = E(i, "value"), y = h(() => {
|
|
20
|
+
var t;
|
|
21
|
+
return ((t = e == null ? void 0 : e.path) == null ? void 0 : t.toString()) || "";
|
|
22
|
+
}), m = h(() => (e == null ? void 0 : e.schema.items.properties) || {});
|
|
23
|
+
function x() {
|
|
24
|
+
if (r.value) {
|
|
25
|
+
const t = {};
|
|
26
|
+
Object.keys(m.value).forEach((l) => {
|
|
27
|
+
const o = m.value[l].type || "string";
|
|
28
|
+
t[l] = o === "number" ? 0 : "";
|
|
29
|
+
}), r.value = [...N(r.value || []), t];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return (t, l) => {
|
|
33
|
+
var o;
|
|
34
|
+
return a(), p(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
class: F(n(_).b())
|
|
38
|
+
},
|
|
39
|
+
[
|
|
40
|
+
(o = r.value) != null && o.length ? (a(!0), p(
|
|
41
|
+
k,
|
|
42
|
+
{ key: 1 },
|
|
43
|
+
C(r.value, (R, c) => (a(), v(
|
|
44
|
+
n(b),
|
|
45
|
+
{
|
|
46
|
+
key: c,
|
|
47
|
+
style: { "margin-bottom": "12px" }
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: u(() => [
|
|
51
|
+
s("div", null, [
|
|
52
|
+
s(
|
|
53
|
+
"span",
|
|
54
|
+
null,
|
|
55
|
+
"#" + f(c + 1) + " " + f(i.title),
|
|
56
|
+
1
|
|
57
|
+
/* TEXT */
|
|
58
|
+
)
|
|
59
|
+
])
|
|
60
|
+
]),
|
|
61
|
+
default: u(() => [
|
|
62
|
+
(a(!0), p(
|
|
63
|
+
k,
|
|
64
|
+
null,
|
|
65
|
+
C(m.value, (d, $) => (a(), v(n(I), {
|
|
66
|
+
key: `${y.value}.${$}.${d.name}`,
|
|
67
|
+
schema: d,
|
|
68
|
+
name: d.name,
|
|
69
|
+
"base-path": `${y.value}.${c}`
|
|
70
|
+
}, null, 8, ["schema", "name", "base-path"]))),
|
|
71
|
+
128
|
|
72
|
+
/* KEYED_FRAGMENT */
|
|
73
|
+
))
|
|
74
|
+
]),
|
|
75
|
+
_: 2
|
|
76
|
+
/* DYNAMIC */
|
|
77
|
+
},
|
|
78
|
+
1024
|
|
79
|
+
/* DYNAMIC_SLOTS */
|
|
80
|
+
))),
|
|
81
|
+
128
|
|
82
|
+
/* KEYED_FRAGMENT */
|
|
83
|
+
)) : (a(), v(n(b), { key: 0 }, {
|
|
84
|
+
title: u(() => [
|
|
85
|
+
s("div", null, [
|
|
86
|
+
s(
|
|
87
|
+
"span",
|
|
88
|
+
null,
|
|
89
|
+
f(i.title),
|
|
90
|
+
1
|
|
91
|
+
/* TEXT */
|
|
92
|
+
)
|
|
93
|
+
])
|
|
94
|
+
]),
|
|
95
|
+
default: u(() => [
|
|
96
|
+
g(n(S), { description: "暂无数据" })
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
/* STABLE */
|
|
100
|
+
})),
|
|
101
|
+
g(n(V), {
|
|
102
|
+
type: "dashed",
|
|
103
|
+
style: { "margin-top": "10px", width: "100%" },
|
|
104
|
+
onClick: x
|
|
105
|
+
}, {
|
|
106
|
+
default: u(() => l[0] || (l[0] = [
|
|
107
|
+
M(" 添加 ")
|
|
108
|
+
])),
|
|
109
|
+
_: 1,
|
|
110
|
+
__: [0]
|
|
111
|
+
})
|
|
112
|
+
],
|
|
113
|
+
2
|
|
114
|
+
/* CLASS */
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
export {
|
|
120
|
+
T as default
|
|
121
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../../internal.mjs";
|
|
2
|
+
import "./array-card.vue.mjs";
|
|
3
|
+
import { transformComponent as r, connect as o, mapProps as a } from "@king-one/form-render";
|
|
4
|
+
import m from "./array-card.vue2.mjs";
|
|
5
|
+
const t = r(m, {
|
|
6
|
+
change: "update:value"
|
|
7
|
+
}), s = o(t, a());
|
|
8
|
+
export {
|
|
9
|
+
s as ArrayCard,
|
|
10
|
+
t as TransformArrayCard
|
|
11
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineComponent as C, mergeModels as y, computed as d, useModel as w, toRaw as m, openBlock as u, createElementBlock as c, normalizeClass as B, unref as n, createVNode as r, withCtx as o, Fragment as T, renderList as $, createBlock as F, createTextVNode as p } from "vue";
|
|
2
|
+
import { Table as M, TableColumn as f, Button as v } from "ant-design-vue";
|
|
3
|
+
import "../../internal.mjs";
|
|
4
|
+
import { useInjectFieldContext as N, RecursionField as V } from "@king-one/form-render";
|
|
5
|
+
import { useNamespace as z } from "../../hooks/use-namespace/index.mjs";
|
|
6
|
+
const E = /* @__PURE__ */ C({
|
|
7
|
+
__name: "array-table",
|
|
8
|
+
props: /* @__PURE__ */ y({
|
|
9
|
+
title: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "默认标题"
|
|
12
|
+
}
|
|
13
|
+
}, {
|
|
14
|
+
value: {},
|
|
15
|
+
valueModifiers: {}
|
|
16
|
+
}),
|
|
17
|
+
emits: ["update:value"],
|
|
18
|
+
setup(_) {
|
|
19
|
+
const l = N(), h = z("ArrayTable"), x = d(() => {
|
|
20
|
+
var i;
|
|
21
|
+
return ((i = l == null ? void 0 : l.path) == null ? void 0 : i.toString()) || "";
|
|
22
|
+
}), e = w(_, "value"), b = d(() => (l == null ? void 0 : l.schema.items.properties) || {});
|
|
23
|
+
function g() {
|
|
24
|
+
e.value && (e.value = [...m(e.value || []), {}]);
|
|
25
|
+
}
|
|
26
|
+
function k(i) {
|
|
27
|
+
if (e.value) {
|
|
28
|
+
const t = m(e.value);
|
|
29
|
+
t.splice(i, 1), e.value = t;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return (i, t) => (u(), c(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
class: B(n(h).b())
|
|
36
|
+
},
|
|
37
|
+
[
|
|
38
|
+
r(n(M), {
|
|
39
|
+
"data-source": e.value,
|
|
40
|
+
pagination: !1,
|
|
41
|
+
bordered: "",
|
|
42
|
+
size: "middle"
|
|
43
|
+
}, {
|
|
44
|
+
default: o(() => [
|
|
45
|
+
(u(!0), c(
|
|
46
|
+
T,
|
|
47
|
+
null,
|
|
48
|
+
$(b.value, (a) => (u(), F(n(f), {
|
|
49
|
+
key: `${a.name}`,
|
|
50
|
+
align: "center",
|
|
51
|
+
title: a.title,
|
|
52
|
+
"data-index": a.name
|
|
53
|
+
}, {
|
|
54
|
+
default: o(({ index: s }) => [
|
|
55
|
+
r(n(V), {
|
|
56
|
+
schema: a,
|
|
57
|
+
name: a.name,
|
|
58
|
+
"base-path": `${x.value}.${s}`
|
|
59
|
+
}, null, 8, ["schema", "name", "base-path"])
|
|
60
|
+
]),
|
|
61
|
+
_: 2
|
|
62
|
+
/* DYNAMIC */
|
|
63
|
+
}, 1032, ["title", "data-index"]))),
|
|
64
|
+
128
|
|
65
|
+
/* KEYED_FRAGMENT */
|
|
66
|
+
)),
|
|
67
|
+
r(n(f), {
|
|
68
|
+
title: "操作",
|
|
69
|
+
"data-index": "action",
|
|
70
|
+
align: "center",
|
|
71
|
+
width: "100px"
|
|
72
|
+
}, {
|
|
73
|
+
default: o(({ index: a }) => [
|
|
74
|
+
r(n(v), {
|
|
75
|
+
type: "link",
|
|
76
|
+
onClick: (s) => k(a)
|
|
77
|
+
}, {
|
|
78
|
+
default: o(() => t[0] || (t[0] = [
|
|
79
|
+
p(" 删除 ")
|
|
80
|
+
])),
|
|
81
|
+
_: 2,
|
|
82
|
+
__: [0]
|
|
83
|
+
}, 1032, ["onClick"])
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
/* STABLE */
|
|
87
|
+
})
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
/* STABLE */
|
|
91
|
+
}, 8, ["data-source"]),
|
|
92
|
+
r(n(v), {
|
|
93
|
+
type: "dashed",
|
|
94
|
+
style: { "margin-top": "10px", width: "100%" },
|
|
95
|
+
onClick: g
|
|
96
|
+
}, {
|
|
97
|
+
default: o(() => t[1] || (t[1] = [
|
|
98
|
+
p(" 添加 ")
|
|
99
|
+
])),
|
|
100
|
+
_: 1,
|
|
101
|
+
__: [1]
|
|
102
|
+
})
|
|
103
|
+
],
|
|
104
|
+
2
|
|
105
|
+
/* CLASS */
|
|
106
|
+
));
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
export {
|
|
110
|
+
E as default
|
|
111
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../../internal.mjs";
|
|
2
|
+
import "./array-table.vue.mjs";
|
|
3
|
+
import { transformComponent as r, connect as o, mapProps as a } from "@king-one/form-render";
|
|
4
|
+
import m from "./array-table.vue2.mjs";
|
|
5
|
+
const t = r(m, {
|
|
6
|
+
change: "update:value"
|
|
7
|
+
}), s = o(t, a());
|
|
8
|
+
export {
|
|
9
|
+
s as ArrayTable,
|
|
10
|
+
t as TransformArrayTable
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "../../internal.mjs";
|
|
2
|
+
import { RangePicker as o } from "ant-design-vue";
|
|
3
|
+
import { transformComponent as r, connect as e, mapProps as t } from "@king-one/form-render";
|
|
4
|
+
const n = r(o, {
|
|
5
|
+
change: "update:value"
|
|
6
|
+
}), c = e(n, t());
|
|
7
|
+
export {
|
|
8
|
+
c as DateRange,
|
|
9
|
+
n as TransformDatePicker
|
|
10
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as s, useModel as i, openBlock as d, createBlock as f, unref as e, withCtx as o, createVNode as u } from "vue";
|
|
2
|
+
import { Row as c, Col as v, Select as p } from "ant-design-vue";
|
|
3
|
+
const x = /* @__PURE__ */ s({
|
|
4
|
+
__name: "form-area",
|
|
5
|
+
props: {
|
|
6
|
+
value: {
|
|
7
|
+
default: () => ({
|
|
8
|
+
province: "",
|
|
9
|
+
city: "",
|
|
10
|
+
county: ""
|
|
11
|
+
})
|
|
12
|
+
},
|
|
13
|
+
valueModifiers: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:value"],
|
|
16
|
+
setup(r) {
|
|
17
|
+
const l = i(r, "value"), n = [
|
|
18
|
+
{
|
|
19
|
+
value: "0",
|
|
20
|
+
label: "山东"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
value: "1",
|
|
24
|
+
label: "河北"
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
return (m, a) => (d(), f(e(c), { gutter: 10 }, {
|
|
28
|
+
default: o(() => [
|
|
29
|
+
u(e(v), { span: 8 }, {
|
|
30
|
+
default: o(() => [
|
|
31
|
+
u(e(p), {
|
|
32
|
+
value: l.value.province,
|
|
33
|
+
"onUpdate:value": a[0] || (a[0] = (t) => l.value.province = t),
|
|
34
|
+
options: n
|
|
35
|
+
}, null, 8, ["value"])
|
|
36
|
+
]),
|
|
37
|
+
_: 1
|
|
38
|
+
/* STABLE */
|
|
39
|
+
}),
|
|
40
|
+
u(e(v), { span: 8 }, {
|
|
41
|
+
default: o(() => [
|
|
42
|
+
u(e(p), {
|
|
43
|
+
value: l.value.city,
|
|
44
|
+
"onUpdate:value": a[1] || (a[1] = (t) => l.value.city = t),
|
|
45
|
+
options: n
|
|
46
|
+
}, null, 8, ["value"])
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
/* STABLE */
|
|
50
|
+
}),
|
|
51
|
+
u(e(v), { span: 8 }, {
|
|
52
|
+
default: o(() => [
|
|
53
|
+
u(e(p), {
|
|
54
|
+
value: l.value.county,
|
|
55
|
+
"onUpdate:value": a[2] || (a[2] = (t) => l.value.county = t),
|
|
56
|
+
options: n
|
|
57
|
+
}, null, 8, ["value"])
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
/* STABLE */
|
|
61
|
+
})
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
/* STABLE */
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
x as default
|
|
70
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../../internal.mjs";
|
|
2
|
+
import "./form-area.vue.mjs";
|
|
3
|
+
import { transformComponent as o, connect as r, mapProps as m } from "@king-one/form-render";
|
|
4
|
+
import t from "./form-area.vue2.mjs";
|
|
5
|
+
const n = o(t, {}), e = r(n, m());
|
|
6
|
+
export {
|
|
7
|
+
e as FormArea,
|
|
8
|
+
n as TransformFormArea
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Input as o } from "ant-design-vue";
|
|
2
|
+
import "../../internal.mjs";
|
|
3
|
+
import { transformComponent as t, connect as n, mapProps as p } from "@king-one/form-render";
|
|
4
|
+
const r = t(o, {
|
|
5
|
+
change: "update:value"
|
|
6
|
+
}), s = n(r, p());
|
|
7
|
+
export {
|
|
8
|
+
s as Input,
|
|
9
|
+
r as TransformInput
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InputNumber as o } from "ant-design-vue";
|
|
2
|
+
import "../../internal.mjs";
|
|
3
|
+
import { transformComponent as r, connect as t, mapProps as n } from "@king-one/form-render";
|
|
4
|
+
const m = r(o, {
|
|
5
|
+
change: "update:value"
|
|
6
|
+
}), a = t(m, n());
|
|
7
|
+
export {
|
|
8
|
+
a as InputNumber,
|
|
9
|
+
m as TransformInput
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Select as r } from "ant-design-vue";
|
|
2
|
+
import "../../internal.mjs";
|
|
3
|
+
import { transformComponent as e, connect as n, mapProps as m } from "@king-one/form-render";
|
|
4
|
+
const c = e(r, {
|
|
5
|
+
change: "update:value"
|
|
6
|
+
}), u = n(c, m({}, (t, o) => ({
|
|
7
|
+
...t,
|
|
8
|
+
options: o == null ? void 0 : o.enum
|
|
9
|
+
})));
|
|
10
|
+
export {
|
|
11
|
+
u as Select,
|
|
12
|
+
c as TransformSelect
|
|
13
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { getCurrentInstance as p, inject as N, ref as v, computed as V, unref as y } from "vue";
|
|
2
|
+
const m = "kr-antdv", l = "is-";
|
|
3
|
+
function c(n, r, t, o, $) {
|
|
4
|
+
let u = `${n}-${r}`;
|
|
5
|
+
return t && (u += `-${t}`), o && (u += `__${o}`), $ && (u += `--${$}`), u;
|
|
6
|
+
}
|
|
7
|
+
const i = Symbol("namespaceContextKey");
|
|
8
|
+
function B(n) {
|
|
9
|
+
const r = n || (p() ? N(i, v(m)) : v(m));
|
|
10
|
+
return V(() => y(r) || m);
|
|
11
|
+
}
|
|
12
|
+
function P(n, r) {
|
|
13
|
+
const t = B(r);
|
|
14
|
+
return {
|
|
15
|
+
namespace: t,
|
|
16
|
+
b: (s = "") => c(t.value, n, s, "", ""),
|
|
17
|
+
e: (s) => s ? c(t.value, n, "", s, "") : "",
|
|
18
|
+
m: (s) => s ? c(t.value, n, "", "", s) : "",
|
|
19
|
+
be: (s, e) => s && e ? c(t.value, n, s, e, "") : "",
|
|
20
|
+
em: (s, e) => s && e ? c(t.value, n, "", s, e) : "",
|
|
21
|
+
bm: (s, e) => s && e ? c(t.value, n, s, "", e) : "",
|
|
22
|
+
bem: (s, e, a) => s && e && a ? c(t.value, n, s, e, a) : "",
|
|
23
|
+
is: (s, ...e) => {
|
|
24
|
+
const a = e.length >= 1 ? e[0] : !0;
|
|
25
|
+
return s && a ? `${l}${s}` : "";
|
|
26
|
+
},
|
|
27
|
+
// css
|
|
28
|
+
cssVar: (s) => {
|
|
29
|
+
const e = {};
|
|
30
|
+
for (const a in s)
|
|
31
|
+
s[a] && (e[`--${t.value}-${a}`] = s[a]);
|
|
32
|
+
return e;
|
|
33
|
+
},
|
|
34
|
+
cssVarName: (s) => `--${t.value}-${s}`,
|
|
35
|
+
cssVarBlock: (s) => {
|
|
36
|
+
const e = {};
|
|
37
|
+
for (const a in s)
|
|
38
|
+
s[a] && (e[`--${t.value}-${n}-${a}`] = s[a]);
|
|
39
|
+
return e;
|
|
40
|
+
},
|
|
41
|
+
cssVarBlockName: (s) => `--${t.value}-${n}-${s}`
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
m as defaultNamespace,
|
|
46
|
+
i as namespaceContextKey,
|
|
47
|
+
B as useGetDerivedNamespace,
|
|
48
|
+
P as useNamespace
|
|
49
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./style/index.mjs";
|
|
2
|
+
import { Input as t } from "./components/Input/index.mjs";
|
|
3
|
+
import { ArrayCard as p } from "./components/ArrayCard/index.mjs";
|
|
4
|
+
import { InputNumber as f } from "./components/InputNumber/index.mjs";
|
|
5
|
+
import { Select as n } from "./components/Select/index.mjs";
|
|
6
|
+
import { FormArea as A } from "./components/FormArea/index.mjs";
|
|
7
|
+
import { DateRange as l } from "./components/DateRange/index.mjs";
|
|
8
|
+
import { ArrayTable as I } from "./components/ArrayTable/index.mjs";
|
|
9
|
+
export {
|
|
10
|
+
p as ArrayCard,
|
|
11
|
+
I as ArrayTable,
|
|
12
|
+
l as DateRange,
|
|
13
|
+
A as FormArea,
|
|
14
|
+
t as Input,
|
|
15
|
+
f as InputNumber,
|
|
16
|
+
n as Select
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RecursionField as t, connect as r, mapProps as m, transformComponent as p, useInjectFieldContext as c } from "@king-one/form-render";
|
|
2
|
+
import "./hooks/index.mjs";
|
|
3
|
+
export {
|
|
4
|
+
t as RecursionField,
|
|
5
|
+
r as connect,
|
|
6
|
+
m as mapProps,
|
|
7
|
+
p as transformComponent,
|
|
8
|
+
c as useInjectFieldContext
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@king-one/form-antdv/dist/theme-chalk/index.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./src/index.js");exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./array-card.vue2.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("ant-design-vue");require("../../internal.js");const k=require("../../hooks/use-namespace/index.js"),m=require("@king-one/form-render"),y=e.defineComponent({__name:"array-card",props:e.mergeModels({title:{type:String,default:"默认标题"}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(u){const p=k.useNamespace("ArrayCard"),t=m.useInjectFieldContext(),r=e.useModel(u,"value"),d=e.computed(()=>{var n;return((n=t==null?void 0:t.path)==null?void 0:n.toString())||""}),c=e.computed(()=>(t==null?void 0:t.schema.items.properties)||{});function v(){if(r.value){const n={};Object.keys(c.value).forEach(a=>{const l=c.value[a].type||"string";n[a]=l==="number"?0:""}),r.value=[...e.toRaw(r.value||[]),n]}}return(n,a)=>{var l;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(p).b())},[(l=r.value)!=null&&l.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(r.value,(h,s)=>(e.openBlock(),e.createBlock(e.unref(o.Card),{key:s,style:{"margin-bottom":"12px"}},{title:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("span",null,"#"+e.toDisplayString(s+1)+" "+e.toDisplayString(u.title),1)])]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(i,f)=>(e.openBlock(),e.createBlock(e.unref(m.RecursionField),{key:`${d.value}.${f}.${i.name}`,schema:i,name:i.name,"base-path":`${d.value}.${s}`},null,8,["schema","name","base-path"]))),128))]),_:2},1024))),128)):(e.openBlock(),e.createBlock(e.unref(o.Card),{key:0},{title:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("span",null,e.toDisplayString(u.title),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(o.Empty),{description:"暂无数据"})]),_:1})),e.createVNode(e.unref(o.Button),{type:"dashed",style:{"margin-top":"10px",width:"100%"},onClick:v},{default:e.withCtx(()=>a[0]||(a[0]=[e.createTextVNode(" 添加 ")])),_:1,__:[0]})],2)}}});exports.default=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../internal.js");require("./array-card.vue.js");const r=require("@king-one/form-render"),a=require("./array-card.vue2.js"),e=r.transformComponent(a.default,{change:"update:value"}),t=r.connect(e,r.mapProps());exports.ArrayCard=t;exports.TransformArrayCard=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./array-table.vue2.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue");require("../../internal.js");const i=require("@king-one/form-render"),v=require("../../hooks/use-namespace/index.js"),x=e.defineComponent({__name:"array-table",props:e.mergeModels({title:{type:String,default:"默认标题"}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(s){const l=i.useInjectFieldContext(),d=v.useNamespace("ArrayTable"),c=e.computed(()=>{var r;return((r=l==null?void 0:l.path)==null?void 0:r.toString())||""}),t=e.useModel(s,"value"),m=e.computed(()=>(l==null?void 0:l.schema.items.properties)||{});function f(){t.value&&(t.value=[...e.toRaw(t.value||[]),{}])}function p(r){if(t.value){const a=e.toRaw(t.value);a.splice(r,1),t.value=a}}return(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(d).b())},[e.createVNode(e.unref(u.Table),{"data-source":t.value,pagination:!1,bordered:"",size:"middle"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,n=>(e.openBlock(),e.createBlock(e.unref(u.TableColumn),{key:`${n.name}`,align:"center",title:n.title,"data-index":n.name},{default:e.withCtx(({index:o})=>[e.createVNode(e.unref(i.RecursionField),{schema:n,name:n.name,"base-path":`${c.value}.${o}`},null,8,["schema","name","base-path"])]),_:2},1032,["title","data-index"]))),128)),e.createVNode(e.unref(u.TableColumn),{title:"操作","data-index":"action",align:"center",width:"100px"},{default:e.withCtx(({index:n})=>[e.createVNode(e.unref(u.Button),{type:"link",onClick:o=>p(n)},{default:e.withCtx(()=>a[0]||(a[0]=[e.createTextVNode(" 删除 ")])),_:2,__:[0]},1032,["onClick"])]),_:1})]),_:1},8,["data-source"]),e.createVNode(e.unref(u.Button),{type:"dashed",style:{"margin-top":"10px",width:"100%"},onClick:f},{default:e.withCtx(()=>a[1]||(a[1]=[e.createTextVNode(" 添加 ")])),_:1,__:[1]})],2))}});exports.default=x;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../internal.js");require("./array-table.vue.js");const e=require("@king-one/form-render"),a=require("./array-table.vue2.js"),r=e.transformComponent(a.default,{change:"update:value"}),t=e.connect(r,e.mapProps());exports.ArrayTable=t;exports.TransformArrayTable=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../internal.js");const n=require("ant-design-vue"),e=require("@king-one/form-render"),r=e.transformComponent(n.RangePicker,{change:"update:value"}),t=e.connect(r,e.mapProps());exports.DateRange=t;exports.TransformDatePicker=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./form-area.vue2.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("ant-design-vue"),r=e.defineComponent({__name:"form-area",props:{value:{default:()=>({province:"",city:"",county:""})},valueModifiers:{}},emits:["update:value"],setup(n){const u=e.useModel(n,"value"),o=[{value:"0",label:"山东"},{value:"1",label:"河北"}];return(v,l)=>(e.openBlock(),e.createBlock(e.unref(t.Row),{gutter:10},{default:e.withCtx(()=>[e.createVNode(e.unref(t.Col),{span:8},{default:e.withCtx(()=>[e.createVNode(e.unref(t.Select),{value:u.value.province,"onUpdate:value":l[0]||(l[0]=a=>u.value.province=a),options:o},null,8,["value"])]),_:1}),e.createVNode(e.unref(t.Col),{span:8},{default:e.withCtx(()=>[e.createVNode(e.unref(t.Select),{value:u.value.city,"onUpdate:value":l[1]||(l[1]=a=>u.value.city=a),options:o},null,8,["value"])]),_:1}),e.createVNode(e.unref(t.Col),{span:8},{default:e.withCtx(()=>[e.createVNode(e.unref(t.Select),{value:u.value.county,"onUpdate:value":l[2]||(l[2]=a=>u.value.county=a),options:o},null,8,["value"])]),_:1})]),_:1}))}});exports.default=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../internal.js");require("./form-area.vue.js");const r=require("@king-one/form-render"),o=require("./form-area.vue2.js"),e=r.transformComponent(o.default,{}),t=r.connect(e,r.mapProps());exports.FormArea=t;exports.TransformFormArea=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("ant-design-vue");require("../../internal.js");const e=require("@king-one/form-render"),n=e.transformComponent(t.Input,{change:"update:value"}),r=e.connect(n,e.mapProps());exports.Input=r;exports.TransformInput=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("ant-design-vue");require("../../internal.js");const e=require("@king-one/form-render"),n=e.transformComponent(r.InputNumber,{change:"update:value"}),t=e.connect(n,e.mapProps());exports.InputNumber=t;exports.TransformInput=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("ant-design-vue");require("../../internal.js");const t=require("@king-one/form-render"),r=t.transformComponent(o.Select,{change:"update:value"}),c=t.connect(r,t.mapProps({},(n,e)=>({...n,options:e==null?void 0:e.enum})));exports.Select=c;exports.TransformSelect=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./use-namespace/index.js");exports.defaultNamespace=e.defaultNamespace;exports.namespaceContextKey=e.namespaceContextKey;exports.useGetDerivedNamespace=e.useGetDerivedNamespace;exports.useNamespace=e.useNamespace;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),m="kr-antdv",y="is-";function c(a,u,t,v,$){let o=`${a}-${u}`;return t&&(o+=`-${t}`),v&&(o+=`__${v}`),$&&(o+=`--${$}`),o}const p=Symbol("namespaceContextKey");function N(a){const u=a||(r.getCurrentInstance()?r.inject(p,r.ref(m)):r.ref(m));return r.computed(()=>r.unref(u)||m)}function l(a,u){const t=N(u);return{namespace:t,b:(e="")=>c(t.value,a,e,"",""),e:e=>e?c(t.value,a,"",e,""):"",m:e=>e?c(t.value,a,"","",e):"",be:(e,s)=>e&&s?c(t.value,a,e,s,""):"",em:(e,s)=>e&&s?c(t.value,a,"",e,s):"",bm:(e,s)=>e&&s?c(t.value,a,e,"",s):"",bem:(e,s,n)=>e&&s&&n?c(t.value,a,e,s,n):"",is:(e,...s)=>{const n=s.length>=1?s[0]:!0;return e&&n?`${y}${e}`:""},cssVar:e=>{const s={};for(const n in e)e[n]&&(s[`--${t.value}-${n}`]=e[n]);return s},cssVarName:e=>`--${t.value}-${e}`,cssVarBlock:e=>{const s={};for(const n in e)e[n]&&(s[`--${t.value}-${a}-${n}`]=e[n]);return s},cssVarBlockName:e=>`--${t.value}-${a}-${e}`}}exports.defaultNamespace=m;exports.namespaceContextKey=p;exports.useGetDerivedNamespace=N;exports.useNamespace=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./style/index.js");const e=require("./components/Input/index.js"),r=require("./components/ArrayCard/index.js"),n=require("./components/InputNumber/index.js"),t=require("./components/Select/index.js"),i=require("./components/FormArea/index.js"),u=require("./components/DateRange/index.js"),a=require("./components/ArrayTable/index.js");exports.Input=e.Input;exports.ArrayCard=r.ArrayCard;exports.InputNumber=n.InputNumber;exports.Select=t.Select;exports.FormArea=i.FormArea;exports.DateRange=u.DateRange;exports.ArrayTable=a.ArrayTable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@king-one/form-render");require("./hooks/index.js");Object.defineProperty(exports,"RecursionField",{enumerable:!0,get:()=>e.RecursionField});Object.defineProperty(exports,"connect",{enumerable:!0,get:()=>e.connect});Object.defineProperty(exports,"mapProps",{enumerable:!0,get:()=>e.mapProps});Object.defineProperty(exports,"transformComponent",{enumerable:!0,get:()=>e.transformComponent});Object.defineProperty(exports,"useInjectFieldContext",{enumerable:!0,get:()=>e.useInjectFieldContext});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("@king-one/form-antdv/dist/theme-chalk/index.css");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-primary-light-3:#79bbff;--king-color-primary-light-5:#a0cfff;--king-color-primary-light-7:#c6e2ff;--king-color-primary-light-8:#d9ecff;--king-color-primary-light-9:#ecf5ff;--king-color-success:#67c23a;--king-color-success-light-3:#95d475;--king-color-success-light-5:#b3e19d;--king-color-success-light-7:#d1edc4;--king-color-success-light-8:#e1f3d8;--king-color-success-light-9:#f0f9eb;--king-color-warning:#e6a23c;--king-color-warning-light-3:#eebe77;--king-color-warning-light-5:#f3d19e;--king-color-warning-light-7:#f8e3c5;--king-color-warning-light-8:#faecd8;--king-color-warning-light-9:#fdf6ec;--king-color-danger:#f56c6c;--king-color-danger-light-3:#f89898;--king-color-danger-light-5:#fab6b6;--king-color-danger-light-7:#fcd3d3;--king-color-danger-light-8:#fde2e2;--king-color-danger-light-9:#fef0f0;--king-color-error:#f56c6c;--king-color-error-light-3:#f89898;--king-color-error-light-5:#fab6b6;--king-color-error-light-7:#fcd3d3;--king-color-error-light-8:#fde2e2;--king-color-error-light-9:#fef0f0;--king-color-info:#909399;--king-color-info-light-3:#b1b3b8;--king-color-info-light-5:#c8c9cc;--king-color-info-light-7:#dedfe0;--king-color-info-light-8:#e9e9eb;--king-color-info-light-9:#f4f4f5;--king-transition-duration:0.3s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.kr-antdv-ArrayCard{margin-bottom:12px}.kr-antdv-ArrayTable{margin-top:12px}.kr-antdv-ArrayTable .ant-table-row .ant-table-cell{padding:0 8px!important}.k-render-form-provider .ant-input-number{width:100%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-primary-light-3:#79bbff;--king-color-primary-light-5:#a0cfff;--king-color-primary-light-7:#c6e2ff;--king-color-primary-light-8:#d9ecff;--king-color-primary-light-9:#ecf5ff;--king-color-success:#67c23a;--king-color-success-light-3:#95d475;--king-color-success-light-5:#b3e19d;--king-color-success-light-7:#d1edc4;--king-color-success-light-8:#e1f3d8;--king-color-success-light-9:#f0f9eb;--king-color-warning:#e6a23c;--king-color-warning-light-3:#eebe77;--king-color-warning-light-5:#f3d19e;--king-color-warning-light-7:#f8e3c5;--king-color-warning-light-8:#faecd8;--king-color-warning-light-9:#fdf6ec;--king-color-danger:#f56c6c;--king-color-danger-light-3:#f89898;--king-color-danger-light-5:#fab6b6;--king-color-danger-light-7:#fcd3d3;--king-color-danger-light-8:#fde2e2;--king-color-danger-light-9:#fef0f0;--king-color-error:#f56c6c;--king-color-error-light-3:#f89898;--king-color-error-light-5:#fab6b6;--king-color-error-light-7:#fcd3d3;--king-color-error-light-8:#fde2e2;--king-color-error-light-9:#fef0f0;--king-color-info:#909399;--king-color-info-light-3:#b1b3b8;--king-color-info-light-5:#c8c9cc;--king-color-info-light-7:#dedfe0;--king-color-info-light-8:#e9e9eb;--king-color-info-light-9:#f4f4f5;--king-transition-duration:0.3s}.kr-antdv-ArrayCard{margin-bottom:12px}.kr-antdv-ArrayTable{margin-top:12px}.kr-antdv-ArrayTable .ant-table-row .ant-table-cell{padding:0 8px!important}.k-render-form-provider .ant-input-number{width:100%}
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
title: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
value: {
|
|
8
|
+
type: PropType<any[]>;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
11
|
+
"update:value": (value: any[]) => any;
|
|
12
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
13
|
+
title: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
value: {
|
|
18
|
+
type: PropType<any[]>;
|
|
19
|
+
};
|
|
20
|
+
}>> & Readonly<{
|
|
21
|
+
"onUpdate:value"?: ((value: any[]) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
title: string;
|
|
24
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
export declare const TransformArrayCard: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const ArrayCard: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
title: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
value: {
|
|
8
|
+
type: PropType<any[]>;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
11
|
+
"update:value": (value: any[]) => any;
|
|
12
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
13
|
+
title: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
value: {
|
|
18
|
+
type: PropType<any[]>;
|
|
19
|
+
};
|
|
20
|
+
}>> & Readonly<{
|
|
21
|
+
"onUpdate:value"?: ((value: any[]) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
title: string;
|
|
24
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
export declare const TransformArrayTable: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const ArrayTable: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
export declare const TransformDatePicker: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const DateRange: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
export interface ArearModelsType {
|
|
3
|
+
/** 所选的值 */
|
|
4
|
+
modelValue: {
|
|
5
|
+
province?: string;
|
|
6
|
+
city?: string;
|
|
7
|
+
county?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
type __VLS_PublicProps = {
|
|
11
|
+
'value'?: ArearModelsType['modelValue'];
|
|
12
|
+
};
|
|
13
|
+
declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
14
|
+
"update:value": (value: {
|
|
15
|
+
province?: string;
|
|
16
|
+
city?: string;
|
|
17
|
+
county?: string;
|
|
18
|
+
}) => any;
|
|
19
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
"onUpdate:value"?: ((value: {
|
|
21
|
+
province?: string;
|
|
22
|
+
city?: string;
|
|
23
|
+
county?: string;
|
|
24
|
+
}) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
export declare const TransformFormArea: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const FormArea: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
export declare const TransformInput: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const Input: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
export declare const TransformInput: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const InputNumber: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefineComponent, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
export declare const TransformSelect: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const Select: DefineComponent<{}, () => VNode<RendererNode, RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-namespace/index';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InjectionKey, Ref, ComputedRef } from 'vue';
|
|
2
|
+
export declare const defaultNamespace = "kr-antdv";
|
|
3
|
+
export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
|
|
4
|
+
export declare function useGetDerivedNamespace(namespaceOverrides?: Ref<string | undefined>): ComputedRef<string>;
|
|
5
|
+
export declare function useNamespace(block: string, namespaceOverrides?: Ref<string | undefined>): {
|
|
6
|
+
namespace: ComputedRef<string>;
|
|
7
|
+
b: (blockSuffix?: string) => string;
|
|
8
|
+
e: (element?: string) => string;
|
|
9
|
+
m: (modifier?: string) => string;
|
|
10
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
11
|
+
em: (element?: string, modifier?: string) => string;
|
|
12
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
13
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
14
|
+
is: {
|
|
15
|
+
(name: string, state: boolean | undefined): string;
|
|
16
|
+
(name: string): string;
|
|
17
|
+
};
|
|
18
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
19
|
+
cssVarName: (name: string) => string;
|
|
20
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
21
|
+
cssVarBlockName: (name: string) => string;
|
|
22
|
+
};
|
|
23
|
+
export type UseNamespaceReturn = ReturnType<typeof useNamespace>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Input } from './components/Input';
|
|
2
|
+
export { ArrayCard } from './components/ArrayCard';
|
|
3
|
+
export { InputNumber } from './components/InputNumber';
|
|
4
|
+
export { Select } from './components/Select';
|
|
5
|
+
export { FormArea } from './components/FormArea';
|
|
6
|
+
export { DateRange } from './components/DateRange';
|
|
7
|
+
export { ArrayTable } from './components/ArrayTable';
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@king-one/form-antdv",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "@king-one 表单渲染器 - ant-design-vue 组件库",
|
|
6
|
+
"author": "",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"style": "./dist/cdn/index.css",
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"sideEffects": [
|
|
11
|
+
"dist/cdn/*",
|
|
12
|
+
"dist/theme-chalk/**/*.css",
|
|
13
|
+
"dist/es/src/**/style/*",
|
|
14
|
+
"dist/lib/src/**/style/*"
|
|
15
|
+
],
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/types/index.d.ts",
|
|
19
|
+
"import": "./dist/es/index.mjs",
|
|
20
|
+
"require": "./dist/lib/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./es": {
|
|
23
|
+
"types": "./dist/types/index.d.ts",
|
|
24
|
+
"import": "./dist/es/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"./lib": {
|
|
27
|
+
"types": "./dist/types/index.d.ts",
|
|
28
|
+
"require": "./dist/lib/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./src/*": "./src/*.js",
|
|
31
|
+
"./*": "./*"
|
|
32
|
+
},
|
|
33
|
+
"main": "./dist/lib/index.js",
|
|
34
|
+
"module": "./dist/es/index.mjs",
|
|
35
|
+
"types": "./dist/types/index.d.ts",
|
|
36
|
+
"files": [
|
|
37
|
+
"CHANGELOG.md",
|
|
38
|
+
"README.md",
|
|
39
|
+
"dist",
|
|
40
|
+
"global.d.ts"
|
|
41
|
+
],
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@king-one/theme": "^1.0.1",
|
|
44
|
+
"ant-design-vue": "^4.2.6",
|
|
45
|
+
"vue": "^3.5.13",
|
|
46
|
+
"@king-one/form-render": "^0.0.3"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public",
|
|
50
|
+
"registry": "https://registry.npmjs.org/"
|
|
51
|
+
},
|
|
52
|
+
"custom": {
|
|
53
|
+
"env": "form-antdv"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
57
|
+
}
|
|
58
|
+
}
|