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