@king-one/form-design 0.0.17 → 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 +12 -0
- package/dist/es/index.mjs +16 -13
- package/dist/es/src/components/base/Carousel.vue.mjs +92 -0
- package/dist/es/src/components/base/Carousel.vue2.mjs +4 -0
- package/dist/es/src/components/base/json-preview.vue.mjs +215 -151
- package/dist/es/src/components/form-material.vue.mjs +168 -94
- package/dist/es/src/components/form-panel.vue.mjs +65 -60
- package/dist/es/src/components/panel/index.mjs +26 -13
- package/dist/es/src/components/panel/panel-item.vue.mjs +39 -39
- 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.vue.mjs +4 -0
- package/dist/es/src/components/panel/widget/date-range.vue2.mjs +28 -0
- package/dist/es/src/components/panel/widget/date-single.vue.mjs +4 -0
- package/dist/es/src/components/panel/widget/date-single.vue2.mjs +28 -0
- package/dist/es/src/components/panel/widget/kit.vue.mjs +4 -0
- package/dist/es/src/components/panel/widget/kit.vue2.mjs +48 -0
- package/dist/es/src/components/panel/widget/object.vue2.mjs +41 -30
- package/dist/es/src/components/panel/widget/select.vue2.mjs +3 -3
- package/dist/es/src/components/props/form-config.vue.mjs +1 -1
- package/dist/es/src/components/props/widget/BaseProps.vue2.mjs +31 -46
- package/dist/es/src/components/props/widget/InputNumberProps.vue2.mjs +94 -109
- package/dist/es/src/components/props/widget/InputProps.vue2.mjs +49 -64
- package/dist/es/src/components/props/widget/OvertimeProps.vue.mjs +4 -0
- package/dist/es/src/components/props/widget/OvertimeProps.vue2.mjs +17 -0
- package/dist/es/src/components/props/widget/PropsDecorator.mjs +34 -0
- package/dist/es/src/components/props/widget/SelectProps.vue.mjs +4 -0
- package/dist/es/src/components/props/widget/SelectProps.vue2.mjs +88 -0
- package/dist/es/src/components/props/widget/TextareaProps.vue2.mjs +48 -63
- package/dist/es/src/components/props/widget/index.mjs +44 -36
- package/dist/es/src/config/index.mjs +235 -16
- package/dist/es/src/core/Design.mjs +24 -16
- package/dist/es/src/core/Field.mjs +1 -1
- package/dist/es/src/core/FormSchema.mjs +29 -27
- package/dist/es/src/index.mjs +15 -13
- package/dist/es/src/internal.mjs +5 -4
- package/dist/es/src/plugins/index.mjs +23 -8
- package/dist/es/src/plugins/modules/drag-add.mjs +23 -0
- package/dist/es/src/utils/debounce.mjs +16 -0
- package/dist/es/src/utils/index.mjs +15 -13
- package/dist/lib/index.js +1 -1
- package/dist/lib/src/components/base/Carousel.vue.js +1 -0
- package/dist/lib/src/components/base/Carousel.vue2.js +1 -0
- package/dist/lib/src/components/base/json-preview.vue.js +6 -6
- package/dist/lib/src/components/form-material.vue.js +10 -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.vue.js +1 -0
- package/dist/lib/src/components/panel/widget/date-range.vue2.js +1 -0
- package/dist/lib/src/components/panel/widget/date-single.vue.js +1 -0
- package/dist/lib/src/components/panel/widget/date-single.vue2.js +1 -0
- package/dist/lib/src/components/panel/widget/kit.vue.js +1 -0
- package/dist/lib/src/components/panel/widget/kit.vue2.js +1 -0
- package/dist/lib/src/components/panel/widget/object.vue2.js +1 -1
- package/dist/lib/src/components/panel/widget/select.vue2.js +1 -1
- package/dist/lib/src/components/props/form-config.vue.js +1 -1
- package/dist/lib/src/components/props/widget/BaseProps.vue2.js +1 -1
- package/dist/lib/src/components/props/widget/InputNumberProps.vue2.js +1 -1
- package/dist/lib/src/components/props/widget/InputProps.vue2.js +1 -1
- package/dist/lib/src/components/props/widget/OvertimeProps.vue.js +1 -0
- package/dist/lib/src/components/props/widget/OvertimeProps.vue2.js +1 -0
- package/dist/lib/src/components/props/widget/PropsDecorator.js +1 -0
- package/dist/lib/src/components/props/widget/SelectProps.vue.js +1 -0
- package/dist/lib/src/components/props/widget/SelectProps.vue2.js +1 -0
- package/dist/lib/src/components/props/widget/TextareaProps.vue2.js +1 -1
- package/dist/lib/src/components/props/widget/index.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/Field.js +1 -1
- package/dist/lib/src/core/FormSchema.js +1 -1
- package/dist/lib/src/index.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/lib/src/utils/debounce.js +1 -0
- package/dist/lib/src/utils/index.js +1 -1
- package/dist/theme-chalk/array-table.css +1 -0
- package/dist/theme-chalk/carousel.css +1 -0
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/json-preview.css +1 -1
- package/dist/theme-chalk/kit-panel.css +1 -0
- package/dist/theme-chalk/material.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 +65 -0
- 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/components/panel/widget/date-range.vue.d.ts +8 -0
- package/dist/types/src/components/panel/widget/date-single.vue.d.ts +8 -0
- package/dist/types/src/components/panel/widget/kit.vue.d.ts +8 -0
- package/dist/types/src/components/props/widget/OvertimeProps.vue.d.ts +3 -0
- package/dist/types/src/components/props/widget/PropsDecorator.d.ts +3 -0
- package/dist/types/src/components/props/widget/SelectProps.vue.d.ts +3 -0
- package/dist/types/src/components/props/widget/index.d.ts +1 -9
- package/dist/types/src/components/types.d.ts +4 -3
- package/dist/types/src/config/index.d.ts +2 -1
- package/dist/types/src/core/Design.d.ts +95 -42
- package/dist/types/src/core/FormSchema.d.ts +22 -10
- package/dist/types/src/hooks/usePolling.d.ts +5 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/internal.d.ts +1 -0
- package/dist/types/src/plugins/index.d.ts +5 -2
- package/dist/types/src/plugins/modules/drag-add.d.ts +6 -0
- package/dist/types/src/types.d.ts +29 -6
- package/dist/types/src/utils/debounce.d.ts +10 -0
- package/dist/types/src/utils/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,79 +1,87 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as O, ref as b, openBlock as l, createElementBlock as d, normalizeClass as u, unref as o, createElementVNode as i, createVNode as a, withCtx as r, createTextVNode as x, Fragment as z, renderList as F, toDisplayString as v, createBlock as J, createCommentVNode as p } from "vue";
|
|
2
2
|
import "../internal.mjs";
|
|
3
|
-
import { RadioGroup as
|
|
4
|
-
import
|
|
5
|
-
import { uid as
|
|
6
|
-
import { useInjectDragContext as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
3
|
+
import { RadioGroup as T, RadioButton as w } from "ant-design-vue";
|
|
4
|
+
import h from "vuedraggable";
|
|
5
|
+
import { uid as W } from "@king-one/utils";
|
|
6
|
+
import { useInjectDragContext as G, useInjectDesignContext as K } from "../context/design.mjs";
|
|
7
|
+
import "./base/Carousel.vue2.mjs";
|
|
8
|
+
import N from "./base/widget-icon.mjs";
|
|
9
|
+
import { useNamespace as g } from "../hooks/use-namespace/index.mjs";
|
|
10
|
+
import L from "./base/Carousel.vue.mjs";
|
|
11
|
+
const M = { class: "widget-group-name" }, U = { class: "widget-col" }, q = { class: "widget-item" }, A = {
|
|
10
12
|
key: 0,
|
|
11
13
|
class: "widget-item-icon"
|
|
12
|
-
},
|
|
14
|
+
}, H = { class: "widget-item-title" }, P = { class: "template-item" }, Q = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "template-item-icon"
|
|
17
|
+
}, X = { class: "template-item-name" }, de = /* @__PURE__ */ O({
|
|
13
18
|
name: "FormMaterial",
|
|
14
19
|
__name: "form-material",
|
|
15
|
-
setup(
|
|
16
|
-
const { updateDrag:
|
|
17
|
-
function
|
|
18
|
-
const { icon:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"k-design-props": Object.assign({
|
|
20
|
+
setup(Y) {
|
|
21
|
+
const y = b(), { updateDrag: m } = G(), { b: S } = g("material"), { b: D } = g("toolbar"), { b: $ } = g("widget"), { b: j } = g("temp"), f = K(), { schema: B, tempSchema: E } = f, _ = b("1");
|
|
22
|
+
function I(s) {
|
|
23
|
+
const { icon: e, ...t } = s, n = JSON.parse(JSON.stringify(t)), k = W(), c = {
|
|
24
|
+
...n,
|
|
25
|
+
name: k,
|
|
26
|
+
id: k,
|
|
27
|
+
"x-design-props": Object.assign({
|
|
24
28
|
validate: {
|
|
25
29
|
status: "",
|
|
26
30
|
message: ""
|
|
27
31
|
}
|
|
28
|
-
},
|
|
32
|
+
}, s["x-design-props"] || {})
|
|
29
33
|
};
|
|
34
|
+
(n.type === "array" || n.type === "object") && (c.children = []);
|
|
35
|
+
const { shared: C } = f;
|
|
36
|
+
return C.draggedContext.field = c, C.draggedContext.key = c.key, c;
|
|
37
|
+
}
|
|
38
|
+
function R(s) {
|
|
39
|
+
const { schema: e } = s, { shared: t } = f;
|
|
40
|
+
return t.draggedContext.field = e, t.draggedContext.key = e.key, e;
|
|
30
41
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const { shared: D } = g;
|
|
35
|
-
D.draggedContext.key = a.key;
|
|
36
|
-
}
|
|
37
|
-
p(!0);
|
|
42
|
+
function V(s) {
|
|
43
|
+
var e;
|
|
44
|
+
(e = y.value) == null || e.goTo(Number(s.target.value) - 1);
|
|
38
45
|
}
|
|
39
|
-
return (
|
|
46
|
+
return (s, e) => (l(), d(
|
|
40
47
|
"div",
|
|
41
48
|
{
|
|
42
|
-
class: u(
|
|
49
|
+
class: u(o(S)())
|
|
43
50
|
},
|
|
44
51
|
[
|
|
45
52
|
i(
|
|
46
53
|
"div",
|
|
47
54
|
{
|
|
48
|
-
class: u(
|
|
55
|
+
class: u(o(D)())
|
|
49
56
|
},
|
|
50
57
|
[
|
|
51
|
-
|
|
52
|
-
value:
|
|
53
|
-
"onUpdate:value":
|
|
58
|
+
a(o(T), {
|
|
59
|
+
value: _.value,
|
|
60
|
+
"onUpdate:value": e[0] || (e[0] = (t) => _.value = t),
|
|
54
61
|
"button-style": "solid",
|
|
55
|
-
size: "default"
|
|
62
|
+
size: "default",
|
|
63
|
+
onChange: V
|
|
56
64
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
|
|
65
|
+
default: r(() => [
|
|
66
|
+
a(o(w), {
|
|
59
67
|
class: "toolbar-button",
|
|
60
68
|
value: "1"
|
|
61
69
|
}, {
|
|
62
|
-
default:
|
|
63
|
-
|
|
70
|
+
default: r(() => e[5] || (e[5] = [
|
|
71
|
+
x(" 组件库 ")
|
|
64
72
|
])),
|
|
65
73
|
_: 1,
|
|
66
|
-
__: [
|
|
74
|
+
__: [5]
|
|
67
75
|
}),
|
|
68
|
-
|
|
76
|
+
a(o(w), {
|
|
69
77
|
class: "toolbar-button",
|
|
70
78
|
value: "2"
|
|
71
79
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
|
|
80
|
+
default: r(() => e[6] || (e[6] = [
|
|
81
|
+
x(" 业务套件 ")
|
|
74
82
|
])),
|
|
75
83
|
_: 1,
|
|
76
|
-
__: [
|
|
84
|
+
__: [6]
|
|
77
85
|
})
|
|
78
86
|
]),
|
|
79
87
|
_: 1
|
|
@@ -83,66 +91,132 @@ const G = { class: "widget-group-name" }, K = { class: "widget-col" }, L = { cla
|
|
|
83
91
|
2
|
|
84
92
|
/* CLASS */
|
|
85
93
|
),
|
|
86
|
-
|
|
87
|
-
|
|
94
|
+
a(
|
|
95
|
+
L,
|
|
88
96
|
{
|
|
89
|
-
|
|
97
|
+
ref_key: "carouselRef",
|
|
98
|
+
ref: y,
|
|
99
|
+
"model-value": 0
|
|
90
100
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
101
|
+
{
|
|
102
|
+
default: r(() => [
|
|
103
|
+
i(
|
|
104
|
+
"div",
|
|
105
|
+
{
|
|
106
|
+
class: u(o($)())
|
|
107
|
+
},
|
|
108
|
+
[
|
|
109
|
+
(l(!0), d(
|
|
110
|
+
z,
|
|
111
|
+
null,
|
|
112
|
+
F(o(B), (t) => (l(), d("div", {
|
|
113
|
+
key: t.key,
|
|
114
|
+
class: "widget-group"
|
|
115
|
+
}, [
|
|
116
|
+
i(
|
|
117
|
+
"div",
|
|
118
|
+
M,
|
|
119
|
+
v(t.name),
|
|
120
|
+
1
|
|
121
|
+
/* TEXT */
|
|
122
|
+
),
|
|
123
|
+
t.widget ? (l(), J(o(h), {
|
|
124
|
+
key: 0,
|
|
125
|
+
list: t.widget,
|
|
126
|
+
class: "widget-list-drag",
|
|
127
|
+
"item-key": "key",
|
|
128
|
+
group: { name: "form", pull: "clone", put: !1 },
|
|
129
|
+
sort: !1,
|
|
130
|
+
options: { animation: 150 },
|
|
131
|
+
clone: I,
|
|
132
|
+
onStart: e[1] || (e[1] = (n) => o(m)(!0)),
|
|
133
|
+
onEnd: e[2] || (e[2] = (n) => o(m)(!1))
|
|
134
|
+
}, {
|
|
135
|
+
item: r(({ element: n }) => [
|
|
136
|
+
i("div", U, [
|
|
137
|
+
i("div", q, [
|
|
138
|
+
n.icon ? (l(), d("div", A, [
|
|
139
|
+
a(o(N), {
|
|
140
|
+
icon: n.icon
|
|
141
|
+
}, null, 8, ["icon"])
|
|
142
|
+
])) : p("v-if", !0),
|
|
143
|
+
i(
|
|
144
|
+
"div",
|
|
145
|
+
H,
|
|
146
|
+
v(n.title),
|
|
147
|
+
1
|
|
148
|
+
/* TEXT */
|
|
149
|
+
)
|
|
150
|
+
])
|
|
151
|
+
])
|
|
152
|
+
]),
|
|
153
|
+
_: 2
|
|
154
|
+
/* DYNAMIC */
|
|
155
|
+
}, 1032, ["list"])) : p("v-if", !0)
|
|
156
|
+
]))),
|
|
157
|
+
128
|
|
158
|
+
/* KEYED_FRAGMENT */
|
|
159
|
+
))
|
|
160
|
+
],
|
|
161
|
+
2
|
|
162
|
+
/* CLASS */
|
|
163
|
+
),
|
|
164
|
+
i(
|
|
165
|
+
"div",
|
|
166
|
+
{
|
|
167
|
+
class: u(o(j)())
|
|
168
|
+
},
|
|
169
|
+
[
|
|
170
|
+
a(o(h), {
|
|
171
|
+
list: o(E),
|
|
172
|
+
class: "template-list-drag",
|
|
173
|
+
"item-key": "key",
|
|
174
|
+
group: { name: "form", pull: "clone", put: !1 },
|
|
175
|
+
sort: !1,
|
|
176
|
+
options: { animation: 150 },
|
|
177
|
+
clone: R,
|
|
178
|
+
onStart: e[3] || (e[3] = (t) => o(m)(!0)),
|
|
179
|
+
onEnd: e[4] || (e[4] = (t) => o(m)(!1))
|
|
180
|
+
}, {
|
|
181
|
+
item: r(({ element: t }) => [
|
|
182
|
+
i("div", P, [
|
|
183
|
+
t.icon ? (l(), d("div", Q, [
|
|
184
|
+
a(o(N), {
|
|
185
|
+
icon: t.icon
|
|
124
186
|
}, null, 8, ["icon"])
|
|
125
|
-
])) :
|
|
187
|
+
])) : p("v-if", !0),
|
|
126
188
|
i(
|
|
127
189
|
"div",
|
|
128
|
-
|
|
129
|
-
|
|
190
|
+
X,
|
|
191
|
+
v(t.name),
|
|
130
192
|
1
|
|
131
193
|
/* TEXT */
|
|
132
194
|
)
|
|
133
195
|
])
|
|
134
|
-
])
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
196
|
+
]),
|
|
197
|
+
_: 1
|
|
198
|
+
/* STABLE */
|
|
199
|
+
}, 8, ["list"]),
|
|
200
|
+
p(` <div class="template-list">
|
|
201
|
+
<div v-for="g in tempSchema" :key="g.key" class="template-item">
|
|
202
|
+
<div v-if="g.icon" class="template-item-icon">
|
|
203
|
+
<WidgetIcon :icon="g.icon" />
|
|
204
|
+
</div>
|
|
205
|
+
<div class="template-item-name">
|
|
206
|
+
{{ g.name }}
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</div> `)
|
|
210
|
+
],
|
|
211
|
+
2
|
|
212
|
+
/* CLASS */
|
|
213
|
+
)
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
/* STABLE */
|
|
217
|
+
},
|
|
218
|
+
512
|
|
219
|
+
/* NEED_PATCH */
|
|
146
220
|
)
|
|
147
221
|
],
|
|
148
222
|
2
|
|
@@ -151,5 +225,5 @@ const G = { class: "widget-group-name" }, K = { class: "widget-col" }, L = { cla
|
|
|
151
225
|
}
|
|
152
226
|
});
|
|
153
227
|
export {
|
|
154
|
-
|
|
228
|
+
de as default
|
|
155
229
|
};
|
|
@@ -1,56 +1,60 @@
|
|
|
1
|
-
import { defineComponent as z, ref as
|
|
1
|
+
import { defineComponent as z, ref as v, nextTick as A, toRaw as E, openBlock as h, createElementBlock as k, normalizeClass as c, unref as e, createElementVNode as o, createVNode as s, withCtx as i, createCommentVNode as f, renderSlot as C, withDirectives as b, vShow as x } from "vue";
|
|
2
2
|
import "../internal.mjs";
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import
|
|
5
|
-
import { useInjectDragContext as
|
|
3
|
+
import { Tooltip as D, Form as R } from "ant-design-vue";
|
|
4
|
+
import T from "vuedraggable";
|
|
5
|
+
import { useInjectDragContext as j, useInjectDesignContext as B } from "../context/design.mjs";
|
|
6
6
|
import "./panel/panel-item.vue2.mjs";
|
|
7
|
-
import
|
|
7
|
+
import J from "./base/json-preview.vue.mjs";
|
|
8
8
|
import "./index.mjs";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as O } from "../hooks/use-namespace/index.mjs";
|
|
10
10
|
import S from "./form-icon.vue2.mjs";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
11
|
+
import P from "./panel/panel-item.vue.mjs";
|
|
12
|
+
const q = { class: "left" }, G = { class: "right" }, H = { class: "content-panel" }, K = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "prompt"
|
|
15
15
|
}, L = { class: "form-item" }, M = { class: "content-editor" }, le = /* @__PURE__ */ z({
|
|
16
16
|
name: "FormPanel",
|
|
17
17
|
__name: "form-panel",
|
|
18
18
|
setup(Q) {
|
|
19
|
-
const
|
|
20
|
-
function D() {
|
|
21
|
-
r.value = !r.value, E(() => {
|
|
22
|
-
f.value = c.getFormSchema();
|
|
23
|
-
});
|
|
24
|
-
}
|
|
19
|
+
const p = v({}), { isDrag: w } = j(), d = v(!1), a = B(), { fields: r } = a;
|
|
25
20
|
function y() {
|
|
21
|
+
d.value = !d.value, A(() => {
|
|
22
|
+
p.value = a.getFormSchema();
|
|
23
|
+
});
|
|
26
24
|
}
|
|
27
|
-
const { b: $, e: p, em: u } = P("panel");
|
|
28
25
|
function F() {
|
|
29
|
-
const { shared: s } = c, { key: t } = s.draggedContext;
|
|
30
|
-
return t !== "";
|
|
31
26
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
const { b: $, e: u, em: g } = O("panel");
|
|
28
|
+
function I(l, t) {
|
|
29
|
+
const n = E(l), { oldIndex: V } = t, m = n[V];
|
|
30
|
+
if (m) {
|
|
31
|
+
const { shared: _ } = a;
|
|
32
|
+
_.draggedContext.key = m.key, _.draggedContext.field = m;
|
|
37
33
|
}
|
|
38
34
|
}
|
|
39
|
-
|
|
35
|
+
async function N() {
|
|
36
|
+
const { shared: l } = a, { field: t } = l.draggedContext, n = {
|
|
37
|
+
source: t,
|
|
38
|
+
traget: r.value,
|
|
39
|
+
region: "form-panel"
|
|
40
|
+
};
|
|
41
|
+
a.hooks.syncDragAdd.call(n), a.setCheckedField(t);
|
|
42
|
+
}
|
|
43
|
+
return (l, t) => (h(), k(
|
|
40
44
|
"div",
|
|
41
45
|
{
|
|
42
|
-
class:
|
|
46
|
+
class: c(e($)())
|
|
43
47
|
},
|
|
44
48
|
[
|
|
45
49
|
o(
|
|
46
50
|
"div",
|
|
47
51
|
{
|
|
48
|
-
class:
|
|
52
|
+
class: c(e(u)("toolbar"))
|
|
49
53
|
},
|
|
50
54
|
[
|
|
51
|
-
o("div",
|
|
52
|
-
|
|
53
|
-
title:
|
|
55
|
+
o("div", q, [
|
|
56
|
+
s(e(D), { placement: "bottom" }, {
|
|
57
|
+
title: i(() => t[1] || (t[1] = [
|
|
54
58
|
o(
|
|
55
59
|
"span",
|
|
56
60
|
null,
|
|
@@ -59,19 +63,19 @@ const A = { class: "left" }, G = { class: "right" }, H = { class: "content-panel
|
|
|
59
63
|
/* CACHED */
|
|
60
64
|
)
|
|
61
65
|
])),
|
|
62
|
-
default:
|
|
63
|
-
|
|
66
|
+
default: i(() => [
|
|
67
|
+
s(e(S), {
|
|
64
68
|
name: "delete1",
|
|
65
|
-
class:
|
|
69
|
+
class: c(e(g)("toolbar", "icon")),
|
|
66
70
|
size: 18,
|
|
67
|
-
onClick:
|
|
71
|
+
onClick: F
|
|
68
72
|
}, null, 8, ["class"])
|
|
69
73
|
]),
|
|
70
74
|
_: 1
|
|
71
75
|
/* STABLE */
|
|
72
76
|
}),
|
|
73
|
-
|
|
74
|
-
title:
|
|
77
|
+
s(e(D), { placement: "bottom" }, {
|
|
78
|
+
title: i(() => t[2] || (t[2] = [
|
|
75
79
|
o(
|
|
76
80
|
"span",
|
|
77
81
|
null,
|
|
@@ -80,68 +84,69 @@ const A = { class: "left" }, G = { class: "right" }, H = { class: "content-panel
|
|
|
80
84
|
/* CACHED */
|
|
81
85
|
)
|
|
82
86
|
])),
|
|
83
|
-
default:
|
|
84
|
-
|
|
87
|
+
default: i(() => [
|
|
88
|
+
s(e(S), {
|
|
85
89
|
name: "code",
|
|
86
|
-
class:
|
|
90
|
+
class: c(e(g)("toolbar", "icon")),
|
|
87
91
|
size: 18,
|
|
88
|
-
onClick:
|
|
92
|
+
onClick: y
|
|
89
93
|
}, null, 8, ["class"])
|
|
90
94
|
]),
|
|
91
95
|
_: 1
|
|
92
96
|
/* STABLE */
|
|
93
97
|
}),
|
|
94
|
-
|
|
98
|
+
f(` <FormIcon name="desktop" />
|
|
95
99
|
<FormIcon name="mobile" /> `)
|
|
96
100
|
]),
|
|
97
101
|
o("div", G, [
|
|
98
|
-
|
|
102
|
+
C(l.$slots, "toolbar")
|
|
99
103
|
])
|
|
100
104
|
],
|
|
101
105
|
2
|
|
102
106
|
/* CLASS */
|
|
103
107
|
),
|
|
104
|
-
|
|
108
|
+
f(' ref="contentTelRef" '),
|
|
105
109
|
o(
|
|
106
110
|
"div",
|
|
107
111
|
{
|
|
108
|
-
class:
|
|
112
|
+
class: c(e(u)("content"))
|
|
109
113
|
},
|
|
110
114
|
[
|
|
111
|
-
|
|
115
|
+
b(o(
|
|
112
116
|
"div",
|
|
113
117
|
H,
|
|
114
118
|
[
|
|
115
|
-
!e(w) && e(
|
|
116
|
-
|
|
119
|
+
!e(w) && e(r).length === 0 ? (h(), k("div", K, " 👈 请在左侧选择控件并拖至此处 ")) : f("v-if", !0),
|
|
120
|
+
s(e(R), {
|
|
117
121
|
autocomplete: "off",
|
|
118
122
|
class: "design-from",
|
|
119
123
|
"label-align": "left"
|
|
120
124
|
}, {
|
|
121
|
-
default:
|
|
122
|
-
|
|
125
|
+
default: i(() => [
|
|
126
|
+
s(e(T), {
|
|
123
127
|
class: "drag-from",
|
|
124
|
-
list: e(
|
|
125
|
-
group: { name: "form"
|
|
128
|
+
list: e(r),
|
|
129
|
+
group: { name: "form" },
|
|
126
130
|
animation: 300,
|
|
127
131
|
sort: !0,
|
|
128
132
|
"item-key": "id",
|
|
129
133
|
"chosen-class": "choose",
|
|
130
|
-
onStart: t[0] || (t[0] = (
|
|
134
|
+
onStart: t[0] || (t[0] = (n) => I(e(r), n)),
|
|
135
|
+
onAdd: N
|
|
131
136
|
}, {
|
|
132
|
-
item:
|
|
137
|
+
item: i(({ element: n }) => [
|
|
133
138
|
o("div", L, [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
field:
|
|
137
|
-
space: e(
|
|
139
|
+
C(l.$slots, `panel-${n.key}`, {}, () => [
|
|
140
|
+
s(P, {
|
|
141
|
+
field: n,
|
|
142
|
+
space: e(r)
|
|
138
143
|
}, null, 8, ["field", "space"])
|
|
139
144
|
])
|
|
140
145
|
])
|
|
141
146
|
]),
|
|
142
147
|
_: 3
|
|
143
148
|
/* FORWARDED */
|
|
144
|
-
}, 8, ["list"
|
|
149
|
+
}, 8, ["list"])
|
|
145
150
|
]),
|
|
146
151
|
_: 3
|
|
147
152
|
/* FORWARDED */
|
|
@@ -150,18 +155,18 @@ const A = { class: "left" }, G = { class: "right" }, H = { class: "content-panel
|
|
|
150
155
|
512
|
|
151
156
|
/* NEED_PATCH */
|
|
152
157
|
), [
|
|
153
|
-
[
|
|
158
|
+
[x, !d.value]
|
|
154
159
|
]),
|
|
155
|
-
|
|
160
|
+
b(o(
|
|
156
161
|
"div",
|
|
157
162
|
M,
|
|
158
163
|
[
|
|
159
|
-
|
|
164
|
+
s(J, { data: p.value }, null, 8, ["data"])
|
|
160
165
|
],
|
|
161
166
|
512
|
|
162
167
|
/* NEED_PATCH */
|
|
163
168
|
), [
|
|
164
|
-
[
|
|
169
|
+
[x, d.value]
|
|
165
170
|
])
|
|
166
171
|
],
|
|
167
172
|
2
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
import { Input as
|
|
1
|
+
import { Input as m, Textarea as o, InputNumber as i } from "ant-design-vue";
|
|
2
2
|
import "./widget/object.vue.mjs";
|
|
3
|
-
import { panelWarpper as
|
|
3
|
+
import { panelWarpper as r } from "./panel-wrapper.mjs";
|
|
4
4
|
import "./widget/select.vue.mjs";
|
|
5
5
|
import "./widget/array-card.vue.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
import "./widget/date-range.vue.mjs";
|
|
7
|
+
import "./widget/date-single.vue.mjs";
|
|
8
|
+
import "./widget/kit.vue.mjs";
|
|
9
|
+
import "./widget/array-table.vue.mjs";
|
|
10
|
+
import e from "./widget/select.vue2.mjs";
|
|
11
|
+
import p from "./widget/object.vue2.mjs";
|
|
12
|
+
import a from "./widget/date-range.vue2.mjs";
|
|
13
|
+
import n from "./widget/date-single.vue2.mjs";
|
|
14
|
+
import f from "./widget/array-card.vue2.mjs";
|
|
15
|
+
import t from "./widget/kit.vue2.mjs";
|
|
16
|
+
import c from "./widget/array-table.vue2.mjs";
|
|
17
|
+
const s = r(m), _ = r(o), k = r(i), W = {
|
|
18
|
+
"k-input": s,
|
|
19
|
+
"k-textarea": _,
|
|
20
|
+
"k-input-number": k,
|
|
21
|
+
"k-select": e,
|
|
22
|
+
"k-object": p,
|
|
23
|
+
"k-date-range": a,
|
|
24
|
+
"k-date-single": n,
|
|
25
|
+
"k-array-card": f,
|
|
26
|
+
"k-overtime": t,
|
|
27
|
+
"k-leave": t,
|
|
28
|
+
"k-table": c
|
|
16
29
|
};
|
|
17
30
|
export {
|
|
18
|
-
|
|
31
|
+
W as widgetPanels
|
|
19
32
|
};
|