@king-one/form-design 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/es/src/components/form-material.vue.mjs +53 -51
- package/dist/es/src/components/form-panel.vue.mjs +69 -70
- package/dist/es/src/components/panel/index.mjs +12 -9
- package/dist/es/src/components/panel/panel-item.vue.mjs +28 -28
- package/dist/es/src/components/panel/panel-wrapper.mjs +25 -15
- package/dist/es/src/components/panel/widget/array-card.vue2.mjs +39 -26
- package/dist/es/src/components/panel/widget/array-table.vue.mjs +4 -0
- package/dist/es/src/components/panel/widget/array-table.vue2.mjs +105 -0
- package/dist/es/src/components/panel/widget/date-range.vue2.mjs +10 -10
- package/dist/es/src/components/panel/widget/object.vue2.mjs +40 -29
- package/dist/es/src/config/index.mjs +90 -21
- package/dist/es/src/core/Design.mjs +15 -12
- package/dist/es/src/core/FormSchema.mjs +1 -1
- package/dist/es/src/internal.mjs +5 -4
- package/dist/es/src/plugins/index.mjs +23 -11
- package/dist/es/src/plugins/modules/drag-add.mjs +23 -0
- package/dist/lib/src/components/form-material.vue.js +1 -1
- package/dist/lib/src/components/form-panel.vue.js +2 -2
- package/dist/lib/src/components/panel/index.js +1 -1
- package/dist/lib/src/components/panel/panel-item.vue.js +1 -1
- package/dist/lib/src/components/panel/panel-wrapper.js +1 -1
- package/dist/lib/src/components/panel/widget/array-card.vue2.js +1 -1
- package/dist/lib/src/components/panel/widget/array-table.vue.js +1 -0
- package/dist/lib/src/components/panel/widget/array-table.vue2.js +1 -0
- package/dist/lib/src/components/panel/widget/date-range.vue2.js +1 -1
- package/dist/lib/src/components/panel/widget/object.vue2.js +1 -1
- package/dist/lib/src/config/index.js +1 -1
- package/dist/lib/src/core/Design.js +1 -1
- package/dist/lib/src/core/FormSchema.js +1 -1
- package/dist/lib/src/internal.js +1 -1
- package/dist/lib/src/plugins/index.js +1 -1
- package/dist/lib/src/plugins/modules/drag-add.js +1 -0
- package/dist/theme-chalk/array-table.css +1 -0
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/panel-item.css +1 -1
- package/dist/theme-chalk/panel.css +1 -1
- package/dist/types/src/components/base/Carousel.vue.d.ts +1 -1
- package/dist/types/src/components/panel/panel-item.vue.d.ts +2 -0
- package/dist/types/src/components/panel/panel-wrapper.d.ts +11 -1
- package/dist/types/src/components/panel/widget/array-table.vue.d.ts +20 -0
- package/dist/types/src/core/Design.d.ts +3 -2
- package/dist/types/src/internal.d.ts +1 -0
- package/dist/types/src/plugins/index.d.ts +3 -2
- package/dist/types/src/plugins/modules/{drag-put.d.ts → drag-add.d.ts} +2 -1
- package/dist/types/src/types.d.ts +3 -3
- package/package.json +1 -1
- package/dist/es/src/plugins/modules/drag-put.mjs +0 -14
- package/dist/lib/src/plugins/modules/drag-put.js +0 -1
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { FormItem as
|
|
1
|
+
import { defineComponent as a, createVNode as n, h as p } from "vue";
|
|
2
|
+
import { FormItem as i } from "ant-design-vue";
|
|
3
3
|
import "../../internal.mjs";
|
|
4
|
-
import { defaultNamespace as
|
|
5
|
-
function s(
|
|
6
|
-
return /* @__PURE__ */
|
|
4
|
+
import { defaultNamespace as m } from "../../hooks/use-namespace/index.mjs";
|
|
5
|
+
function s(t) {
|
|
6
|
+
return /* @__PURE__ */ a({
|
|
7
7
|
name: "panelWarpper",
|
|
8
8
|
props: {
|
|
9
9
|
field: {
|
|
10
10
|
type: Object
|
|
11
|
+
},
|
|
12
|
+
hideTitle: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
11
15
|
}
|
|
12
16
|
},
|
|
13
17
|
setup(e) {
|
|
14
|
-
var
|
|
15
|
-
const
|
|
18
|
+
var l;
|
|
19
|
+
const r = (l = e.field) == null ? void 0 : l["x-component-props"];
|
|
16
20
|
return () => {
|
|
17
|
-
var
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
var o;
|
|
22
|
+
return n("div", null, [e.hideTitle ? p(t, {
|
|
23
|
+
...r,
|
|
24
|
+
readonly: !0
|
|
25
|
+
}) : n(i, {
|
|
26
|
+
class: [`${m}-panel-item__form`],
|
|
27
|
+
label: (o = e.field) == null ? void 0 : o.title
|
|
21
28
|
}, {
|
|
22
|
-
default: () =>
|
|
23
|
-
...
|
|
24
|
-
readonly: !0
|
|
29
|
+
default: () => p(t, {
|
|
30
|
+
...r,
|
|
31
|
+
readonly: !0,
|
|
32
|
+
style: {
|
|
33
|
+
width: "100%"
|
|
34
|
+
}
|
|
25
35
|
}),
|
|
26
36
|
_: 1
|
|
27
|
-
}, 8, ["label"]);
|
|
37
|
+
}, 8, ["label"])]);
|
|
28
38
|
};
|
|
29
39
|
}
|
|
30
40
|
});
|
|
@@ -1,52 +1,65 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as p, toRaw as h, openBlock as y, createElementBlock as k, createElementVNode as o, toDisplayString as x, createVNode as c, unref as a, normalizeClass as C, withCtx as v, renderSlot as w } from "vue";
|
|
2
|
+
import A from "vuedraggable";
|
|
3
3
|
import "../../../internal.mjs";
|
|
4
|
+
import { message as D } from "ant-design-vue";
|
|
4
5
|
import "../../../index.mjs";
|
|
5
|
-
import { useInjectDesignContext as
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
import
|
|
8
|
-
const N = { class: "form-item" },
|
|
6
|
+
import { useInjectDesignContext as b } from "../../../context/design.mjs";
|
|
7
|
+
import { useNamespace as I } from "../../../hooks/use-namespace/index.mjs";
|
|
8
|
+
import S from "../panel-item.vue.mjs";
|
|
9
|
+
const N = { class: "form-item" }, F = /* @__PURE__ */ p({
|
|
9
10
|
inheritAttrs: !1,
|
|
10
11
|
__name: "array-card",
|
|
11
12
|
props: {
|
|
12
13
|
field: {}
|
|
13
14
|
},
|
|
14
15
|
setup(s) {
|
|
15
|
-
const
|
|
16
|
+
const i = b(), { b: f } = I("panel-drag");
|
|
16
17
|
function m() {
|
|
17
18
|
return !0;
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
const { shared:
|
|
23
|
-
|
|
20
|
+
function g(e, t) {
|
|
21
|
+
const n = h(e), { oldIndex: l } = t, r = n[l];
|
|
22
|
+
if (r) {
|
|
23
|
+
const { shared: d } = i;
|
|
24
|
+
d.draggedContext.key = r.key, d.draggedContext.field = r;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
n
|
|
27
|
+
function u() {
|
|
28
|
+
const { shared: e } = i, { field: t } = e.draggedContext, n = {
|
|
29
|
+
source: t,
|
|
30
|
+
traget: s.field.children,
|
|
31
|
+
region: "k-array-card"
|
|
32
|
+
};
|
|
33
|
+
if (i.hooks.syncDragAdd.call(n), !i.dragAddResult.every((r) => r)) {
|
|
34
|
+
const r = s.field.children.findIndex((d) => d.id === t.id);
|
|
35
|
+
r !== -1 && (s.field.children.splice(r, 1), D.warning("不能将该控件拖拽到列表容器中"));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return (e, t) => (y(), k("div", null, [
|
|
39
|
+
o(
|
|
28
40
|
"div",
|
|
29
41
|
null,
|
|
30
|
-
|
|
42
|
+
x(e.field.title),
|
|
31
43
|
1
|
|
32
44
|
/* TEXT */
|
|
33
45
|
),
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
o("div", null, [
|
|
47
|
+
c(a(A), {
|
|
36
48
|
list: e.field.children,
|
|
37
|
-
class: C(
|
|
49
|
+
class: C(a(f)()),
|
|
38
50
|
group: { name: "form", put: m },
|
|
39
51
|
animation: 300,
|
|
40
52
|
sort: !0,
|
|
41
53
|
"item-key": "id",
|
|
42
54
|
"chosen-class": "choose",
|
|
43
|
-
onStart: t[0] || (t[0] = (
|
|
55
|
+
onStart: t[0] || (t[0] = (n) => g(e.field.children, n)),
|
|
56
|
+
onAdd: u
|
|
44
57
|
}, {
|
|
45
|
-
item: v(({ element:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
field:
|
|
58
|
+
item: v(({ element: n }) => [
|
|
59
|
+
o("div", N, [
|
|
60
|
+
w(e.$slots, `panel-${n.key}`, {}, () => [
|
|
61
|
+
c(a(S), {
|
|
62
|
+
field: n,
|
|
50
63
|
space: e.field.children
|
|
51
64
|
}, null, 8, ["field", "space"])
|
|
52
65
|
])
|
|
@@ -55,7 +68,7 @@ const N = { class: "form-item" }, j = /* @__PURE__ */ u({
|
|
|
55
68
|
_: 3
|
|
56
69
|
/* FORWARDED */
|
|
57
70
|
}, 8, ["list", "class", "group"]),
|
|
58
|
-
t[1] || (t[1] =
|
|
71
|
+
t[1] || (t[1] = o(
|
|
59
72
|
"div",
|
|
60
73
|
{ style: { color: "#c0bebe", "text-align": "center", width: "90%", padding: "5px" } },
|
|
61
74
|
" ☝ 拖拽控件到容器内部 ",
|
|
@@ -67,5 +80,5 @@ const N = { class: "form-item" }, j = /* @__PURE__ */ u({
|
|
|
67
80
|
}
|
|
68
81
|
});
|
|
69
82
|
export {
|
|
70
|
-
|
|
83
|
+
F as default
|
|
71
84
|
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { defineComponent as f, openBlock as g, createElementBlock as p, normalizeClass as b, unref as l, createElementVNode as e, createVNode as o, withCtx as y, renderSlot as u, toDisplayString as v } from "vue";
|
|
2
|
+
import h from "vuedraggable";
|
|
3
|
+
import "../../../index.mjs";
|
|
4
|
+
import "../../../internal.mjs";
|
|
5
|
+
import { message as x } from "ant-design-vue";
|
|
6
|
+
import { useInjectDesignContext as _ } from "../../../context/design.mjs";
|
|
7
|
+
import { useNamespace as C } from "../../../hooks/use-namespace/index.mjs";
|
|
8
|
+
import k from "../panel-item.vue.mjs";
|
|
9
|
+
const A = { class: "array-table-box" }, D = { class: "array-table-drag" }, w = { class: "form-item" }, I = { class: "table-item" }, N = { class: "array-table-drag-header" }, $ = { class: "array-table-drag-content" }, T = /* @__PURE__ */ f({
|
|
10
|
+
name: "ArrayTable",
|
|
11
|
+
__name: "array-table",
|
|
12
|
+
props: {
|
|
13
|
+
field: {}
|
|
14
|
+
},
|
|
15
|
+
setup(s) {
|
|
16
|
+
const d = _(), { b: n } = C("array-table");
|
|
17
|
+
function c() {
|
|
18
|
+
const { shared: a } = d, { field: t } = a.draggedContext, r = {
|
|
19
|
+
source: t,
|
|
20
|
+
traget: s.field.children,
|
|
21
|
+
region: "k-array-card"
|
|
22
|
+
};
|
|
23
|
+
if (d.hooks.syncDragAdd.call(r), !d.dragAddResult.every((i) => i)) {
|
|
24
|
+
const i = s.field.children.findIndex((m) => m.id === t.id);
|
|
25
|
+
i !== -1 && (s.field.children.splice(i, 1), x.warning("不能将该控件拖拽到列表容器中"));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return (a, t) => (g(), p(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
class: b(l(n)())
|
|
32
|
+
},
|
|
33
|
+
[
|
|
34
|
+
t[1] || (t[1] = e(
|
|
35
|
+
"div",
|
|
36
|
+
null,
|
|
37
|
+
"明细列表",
|
|
38
|
+
-1
|
|
39
|
+
/* CACHED */
|
|
40
|
+
)),
|
|
41
|
+
e("div", A, [
|
|
42
|
+
t[0] || (t[0] = e(
|
|
43
|
+
"div",
|
|
44
|
+
{ class: "array-table-left" },
|
|
45
|
+
[
|
|
46
|
+
e("div", { class: "array-table-drag-header" }, " 表头 "),
|
|
47
|
+
e("div", { class: "array-table-drag-content" })
|
|
48
|
+
],
|
|
49
|
+
-1
|
|
50
|
+
/* CACHED */
|
|
51
|
+
)),
|
|
52
|
+
e("div", D, [
|
|
53
|
+
o(l(h), {
|
|
54
|
+
class: "widget-drag",
|
|
55
|
+
list: a.field.children,
|
|
56
|
+
group: { name: "form", direction: "vertical", removeCloneOnHide: !1 },
|
|
57
|
+
animation: 300,
|
|
58
|
+
sort: !0,
|
|
59
|
+
"item-key": "id",
|
|
60
|
+
"drag-class": "table-item-drag-class",
|
|
61
|
+
onAdd: c
|
|
62
|
+
}, {
|
|
63
|
+
item: y(({ element: r }) => [
|
|
64
|
+
e("div", w, [
|
|
65
|
+
u(a.$slots, `panel-${r.key}`, {}, () => [
|
|
66
|
+
e("div", I, [
|
|
67
|
+
e(
|
|
68
|
+
"div",
|
|
69
|
+
N,
|
|
70
|
+
v(r.title),
|
|
71
|
+
1
|
|
72
|
+
/* TEXT */
|
|
73
|
+
),
|
|
74
|
+
e("div", $, [
|
|
75
|
+
o(l(k), {
|
|
76
|
+
field: r,
|
|
77
|
+
space: a.field.children,
|
|
78
|
+
"hide-title": ""
|
|
79
|
+
}, null, 8, ["field", "space"])
|
|
80
|
+
])
|
|
81
|
+
])
|
|
82
|
+
])
|
|
83
|
+
])
|
|
84
|
+
]),
|
|
85
|
+
_: 3
|
|
86
|
+
/* FORWARDED */
|
|
87
|
+
}, 8, ["list"])
|
|
88
|
+
])
|
|
89
|
+
]),
|
|
90
|
+
t[2] || (t[2] = e(
|
|
91
|
+
"div",
|
|
92
|
+
{ style: { color: "#c0bebe", "text-align": "center", width: "90%", padding: "5px" } },
|
|
93
|
+
" ☝ 拖拽控件到明细列表 ",
|
|
94
|
+
-1
|
|
95
|
+
/* CACHED */
|
|
96
|
+
))
|
|
97
|
+
],
|
|
98
|
+
2
|
|
99
|
+
/* CLASS */
|
|
100
|
+
));
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
export {
|
|
104
|
+
T as default
|
|
105
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { FormItem as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as r, openBlock as t, createBlock as n, unref as o, withCtx as l, createVNode as p, mergeProps as a } from "vue";
|
|
2
|
+
import { FormItem as f, RangePicker as m } from "ant-design-vue";
|
|
3
|
+
const u = /* @__PURE__ */ r({
|
|
4
4
|
__name: "date-range",
|
|
5
5
|
props: {
|
|
6
6
|
field: {}
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
return (e,
|
|
8
|
+
setup(i) {
|
|
9
|
+
return (e, c) => (t(), n(o(f), {
|
|
10
10
|
label: e.field.title
|
|
11
11
|
}, {
|
|
12
|
-
default:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
default: l(() => [
|
|
13
|
+
p(
|
|
14
|
+
o(m),
|
|
15
|
+
a(e.field["x-component-props"], { open: !1 }),
|
|
16
16
|
null,
|
|
17
17
|
16
|
|
18
18
|
/* FULL_PROPS */
|
|
@@ -24,5 +24,5 @@ const _ = /* @__PURE__ */ o({
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
u as default
|
|
28
28
|
};
|
|
@@ -1,52 +1,63 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, toRaw as u, openBlock as h, createElementBlock as k, createElementVNode as r, toDisplayString as x, createVNode as c, unref as l, normalizeClass as y, withCtx as C, renderSlot as b } from "vue";
|
|
2
2
|
import v from "vuedraggable";
|
|
3
3
|
import "../../../internal.mjs";
|
|
4
4
|
import "../../../index.mjs";
|
|
5
|
+
import { message as A } from "ant-design-vue";
|
|
5
6
|
import { useInjectDesignContext as w } from "../../../context/design.mjs";
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
7
|
+
import { useNamespace as D } from "../../../hooks/use-namespace/index.mjs";
|
|
8
|
+
import I from "../panel-item.vue.mjs";
|
|
9
|
+
const S = { class: "form-item" }, q = /* @__PURE__ */ p({
|
|
9
10
|
inheritAttrs: !1,
|
|
10
11
|
__name: "object",
|
|
11
12
|
props: {
|
|
12
13
|
field: {}
|
|
13
14
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
|
|
15
|
+
setup(s) {
|
|
16
|
+
const i = w(), { b: f } = D("panel-drag");
|
|
17
|
+
function m(e, t) {
|
|
18
|
+
const n = u(e), { oldIndex: a } = t, o = n[a];
|
|
19
|
+
if (o) {
|
|
20
|
+
const { shared: d } = i;
|
|
21
|
+
d.draggedContext.key = o.key, d.draggedContext.field = o;
|
|
22
|
+
}
|
|
18
23
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
function g() {
|
|
25
|
+
console.log("dragAdd");
|
|
26
|
+
const { shared: e } = i, { field: t } = e.draggedContext, n = {
|
|
27
|
+
source: t,
|
|
28
|
+
traget: s.field.children,
|
|
29
|
+
region: "k-object"
|
|
30
|
+
};
|
|
31
|
+
if (i.hooks.syncDragAdd.call(n), !i.dragAddResult.every((o) => o)) {
|
|
32
|
+
const o = s.field.children.findIndex((d) => d.id === t.id);
|
|
33
|
+
o !== -1 && (s.field.children.splice(o, 1), A.warning("不能将该控件拖拽到对象容器中"));
|
|
24
34
|
}
|
|
25
35
|
}
|
|
26
|
-
return (e, t) => (
|
|
27
|
-
|
|
36
|
+
return (e, t) => (h(), k("div", null, [
|
|
37
|
+
r(
|
|
28
38
|
"div",
|
|
29
39
|
null,
|
|
30
|
-
|
|
40
|
+
x(e.field.title),
|
|
31
41
|
1
|
|
32
42
|
/* TEXT */
|
|
33
43
|
),
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
r("div", null, [
|
|
45
|
+
c(l(v), {
|
|
36
46
|
list: e.field.children,
|
|
37
|
-
class: y(
|
|
38
|
-
group: { name: "form"
|
|
47
|
+
class: y(l(f)()),
|
|
48
|
+
group: { name: "form" },
|
|
39
49
|
animation: 300,
|
|
40
50
|
sort: !0,
|
|
41
51
|
"item-key": "id",
|
|
42
52
|
"chosen-class": "choose",
|
|
43
|
-
onStart: t[0] || (t[0] = (
|
|
53
|
+
onStart: t[0] || (t[0] = (n) => m(e.field.children, n)),
|
|
54
|
+
onAdd: g
|
|
44
55
|
}, {
|
|
45
|
-
item: C(({ element:
|
|
46
|
-
|
|
47
|
-
b(e.$slots, `panel-${
|
|
48
|
-
|
|
49
|
-
field:
|
|
56
|
+
item: C(({ element: n }) => [
|
|
57
|
+
r("div", S, [
|
|
58
|
+
b(e.$slots, `panel-${n.key}`, {}, () => [
|
|
59
|
+
c(l(I), {
|
|
60
|
+
field: n,
|
|
50
61
|
space: e.field.children
|
|
51
62
|
}, null, 8, ["field", "space"])
|
|
52
63
|
])
|
|
@@ -54,8 +65,8 @@ const _ = { class: "form-item" }, V = /* @__PURE__ */ f({
|
|
|
54
65
|
]),
|
|
55
66
|
_: 3
|
|
56
67
|
/* FORWARDED */
|
|
57
|
-
}, 8, ["list", "class"
|
|
58
|
-
t[1] || (t[1] =
|
|
68
|
+
}, 8, ["list", "class"]),
|
|
69
|
+
t[1] || (t[1] = r(
|
|
59
70
|
"div",
|
|
60
71
|
{ style: { color: "#c0bebe", "text-align": "center", width: "90%", padding: "5px" } },
|
|
61
72
|
" ☝ 拖拽控件到布局容器内部 ",
|
|
@@ -67,5 +78,5 @@ const _ = { class: "form-item" }, V = /* @__PURE__ */ f({
|
|
|
67
78
|
}
|
|
68
79
|
});
|
|
69
80
|
export {
|
|
70
|
-
|
|
81
|
+
q as default
|
|
71
82
|
};
|
|
@@ -76,13 +76,17 @@ const e = {
|
|
|
76
76
|
type: "array",
|
|
77
77
|
format: "date",
|
|
78
78
|
items: {
|
|
79
|
-
type: "string"
|
|
79
|
+
type: "string",
|
|
80
|
+
format: "date"
|
|
80
81
|
},
|
|
81
82
|
icon: "form-date",
|
|
82
|
-
"x-component": "
|
|
83
|
+
"x-component": "DateRange",
|
|
83
84
|
"x-component-props": {
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
valueFormat: "YYYY-MM-DD",
|
|
86
|
+
placeholder: [
|
|
87
|
+
"开始日期",
|
|
88
|
+
"结束日期"
|
|
89
|
+
]
|
|
86
90
|
}
|
|
87
91
|
},
|
|
88
92
|
{
|
|
@@ -102,7 +106,27 @@ const e = {
|
|
|
102
106
|
key: "k-form-area",
|
|
103
107
|
type: "object",
|
|
104
108
|
icon: "form-area",
|
|
105
|
-
"x-component": "FormArea"
|
|
109
|
+
"x-component": "FormArea",
|
|
110
|
+
children: [
|
|
111
|
+
{
|
|
112
|
+
title: "省份",
|
|
113
|
+
key: "k-form-area-province",
|
|
114
|
+
type: "string",
|
|
115
|
+
name: "province"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
title: "城市",
|
|
119
|
+
key: "k-form-area-city",
|
|
120
|
+
type: "string",
|
|
121
|
+
name: "city"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
title: "区县",
|
|
125
|
+
key: "k-form-area-county",
|
|
126
|
+
type: "string",
|
|
127
|
+
name: "county"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
106
130
|
}
|
|
107
131
|
]
|
|
108
132
|
}, o = {
|
|
@@ -117,7 +141,7 @@ const e = {
|
|
|
117
141
|
children: []
|
|
118
142
|
},
|
|
119
143
|
{
|
|
120
|
-
title: "
|
|
144
|
+
title: "列表容器",
|
|
121
145
|
key: "k-array-card",
|
|
122
146
|
type: "array",
|
|
123
147
|
icon: "form-list",
|
|
@@ -152,15 +176,60 @@ const e = {
|
|
|
152
176
|
},
|
|
153
177
|
children: [
|
|
154
178
|
{
|
|
155
|
-
title: "
|
|
156
|
-
key: "k-
|
|
157
|
-
type: "
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
179
|
+
title: "加班明细",
|
|
180
|
+
key: "k-array-card",
|
|
181
|
+
type: "array",
|
|
182
|
+
children: [
|
|
183
|
+
{
|
|
184
|
+
title: "日期范围",
|
|
185
|
+
key: "k-date-range",
|
|
186
|
+
type: "array",
|
|
187
|
+
format: "date",
|
|
188
|
+
items: {
|
|
189
|
+
type: "string",
|
|
190
|
+
format: "date"
|
|
191
|
+
},
|
|
192
|
+
"x-component": "DateRange",
|
|
193
|
+
"x-component-props": {
|
|
194
|
+
valueFormat: "YYYY-MM-DD HH:mm:ss",
|
|
195
|
+
showTime: !0,
|
|
196
|
+
placeholder: [
|
|
197
|
+
"开始日期",
|
|
198
|
+
"结束日期"
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
name: "m6husq11vxw",
|
|
202
|
+
id: "m6husq11vxw",
|
|
203
|
+
"x-design-props": {
|
|
204
|
+
validate: {
|
|
205
|
+
status: "",
|
|
206
|
+
message: ""
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
children: []
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
title: "加班时长",
|
|
213
|
+
key: "k-input-number",
|
|
214
|
+
type: "number",
|
|
215
|
+
"x-component": "InputNumber",
|
|
216
|
+
"x-component-props": {
|
|
217
|
+
placeholder: "请输入"
|
|
218
|
+
},
|
|
219
|
+
name: "b9yt6cz0u9f",
|
|
220
|
+
id: "b9yt6cz0u9f",
|
|
221
|
+
"x-design-props": {
|
|
222
|
+
validate: {
|
|
223
|
+
status: "",
|
|
224
|
+
message: ""
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"x-component": "ArrayCard",
|
|
230
|
+
"x-decorator": "Void",
|
|
231
|
+
name: "ptkezwx2oqd",
|
|
232
|
+
id: "ptkezwx2oqd",
|
|
164
233
|
"x-design-props": {
|
|
165
234
|
validate: {
|
|
166
235
|
status: "",
|
|
@@ -169,15 +238,15 @@ const e = {
|
|
|
169
238
|
}
|
|
170
239
|
},
|
|
171
240
|
{
|
|
172
|
-
title: "
|
|
173
|
-
key: "k-input
|
|
174
|
-
type: "
|
|
175
|
-
"x-component": "
|
|
241
|
+
title: "总时长",
|
|
242
|
+
key: "k-input",
|
|
243
|
+
type: "string",
|
|
244
|
+
"x-component": "Input",
|
|
176
245
|
"x-component-props": {
|
|
177
246
|
placeholder: "请输入"
|
|
178
247
|
},
|
|
179
|
-
name: "
|
|
180
|
-
id: "
|
|
248
|
+
name: "rrglkf7d06w",
|
|
249
|
+
id: "rrglkf7d06w",
|
|
181
250
|
"x-design-props": {
|
|
182
251
|
validate: {
|
|
183
252
|
status: "",
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var m = Object.defineProperty;
|
|
2
2
|
var p = (r, e, s) => e in r ? m(r, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[e] = s;
|
|
3
3
|
var t = (r, e, s) => p(r, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
-
import { ref as
|
|
4
|
+
import { ref as d } from "vue";
|
|
5
5
|
import "../effects/index.mjs";
|
|
6
|
-
import { widgetPanels as
|
|
6
|
+
import { widgetPanels as c } from "../components/panel/index.mjs";
|
|
7
7
|
import "../components/props/index.mjs";
|
|
8
8
|
import { Plugin as l } from "../plugins/index.mjs";
|
|
9
|
-
import { Heart as
|
|
10
|
-
import { FormSchema as
|
|
11
|
-
import { widgetProps as
|
|
9
|
+
import { Heart as n } from "./Heart.mjs";
|
|
10
|
+
import { FormSchema as g } from "./FormSchema.mjs";
|
|
11
|
+
import { widgetProps as a } from "../components/props/widget/index.mjs";
|
|
12
12
|
import { runEffects as f } from "../effects/effective.mjs";
|
|
13
|
-
class
|
|
13
|
+
class C {
|
|
14
14
|
constructor(e) {
|
|
15
15
|
t(this, "schema");
|
|
16
16
|
t(this, "tempSchema");
|
|
17
17
|
t(this, "heart");
|
|
18
18
|
t(this, "plugin");
|
|
19
|
-
t(this, "FormSchema", new
|
|
19
|
+
t(this, "FormSchema", new g());
|
|
20
20
|
t(this, "props");
|
|
21
|
-
t(this, "checkedField",
|
|
21
|
+
t(this, "checkedField", d({}));
|
|
22
22
|
t(this, "shared", {
|
|
23
23
|
draggedContext: {
|
|
24
24
|
key: "",
|
|
@@ -33,12 +33,12 @@ class L {
|
|
|
33
33
|
});
|
|
34
34
|
const { extendFormProps: s = [], propsWidgets: i = {}, panelWidgets: o = {}, ...h } = e;
|
|
35
35
|
this.shared.panelWidgets = {
|
|
36
|
-
...
|
|
36
|
+
...c,
|
|
37
37
|
...o
|
|
38
38
|
}, this.shared.propsWidgets = {
|
|
39
|
-
...
|
|
39
|
+
...a,
|
|
40
40
|
...i
|
|
41
|
-
}, this.props = { ...h }, this.schema = e.schema, this.tempSchema = e.tempSchema || [], this.plugin = new l(), this.heart = new
|
|
41
|
+
}, this.props = { ...h }, this.schema = e.schema, this.tempSchema = e.tempSchema || [], this.plugin = new l(), this.heart = new n({
|
|
42
42
|
lifecycles: this.lifecycles,
|
|
43
43
|
context: this
|
|
44
44
|
}), this.extendFormProps = s;
|
|
@@ -61,10 +61,13 @@ class L {
|
|
|
61
61
|
get hooks() {
|
|
62
62
|
return this.plugin.hooks;
|
|
63
63
|
}
|
|
64
|
+
get dragAddResult() {
|
|
65
|
+
return this.plugin.dragAddResult;
|
|
66
|
+
}
|
|
64
67
|
get fields() {
|
|
65
68
|
return this.FormSchema.fields;
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
export {
|
|
69
|
-
|
|
72
|
+
C as FormDesign
|
|
70
73
|
};
|
package/dist/es/src/internal.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "./hooks/index.mjs";
|
|
2
|
-
import { useInjectDesignContext as
|
|
2
|
+
import { useInjectDesignContext as r, useInjectDragContext as i, useProvideDesignContext as s, useProvideDragContext as x } from "./context/design.mjs";
|
|
3
|
+
import "./utils/index.mjs";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
r as useInjectDesignContext,
|
|
6
|
+
i as useInjectDragContext,
|
|
6
7
|
s as useProvideDesignContext,
|
|
7
|
-
|
|
8
|
+
x as useProvideDragContext
|
|
8
9
|
};
|