@king-one/form-design 0.0.34 → 0.0.36
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 +10 -9
- package/dist/es/src/components/form-panel.vue.mjs +56 -55
- package/dist/es/src/components/panel/panel-item.vue.mjs +38 -36
- package/dist/es/src/components/panel/widget/array-table.vue2.mjs +31 -29
- package/dist/es/src/components/panel/widget/grid.vue2.mjs +33 -31
- package/dist/es/src/components/panel/widget/object.vue2.mjs +18 -16
- package/dist/es/src/config/index.mjs +30 -7
- package/dist/es/src/effects/effect-dict.mjs +1 -0
- package/dist/es/src/effects/onEffects.mjs +8 -7
- package/dist/es/src/hooks/index.mjs +6 -4
- package/dist/es/src/hooks/use-actions.mjs +20 -0
- package/dist/es/src/index.mjs +9 -8
- package/dist/lib/index.js +1 -1
- package/dist/lib/src/components/form-panel.vue.js +2 -2
- package/dist/lib/src/components/panel/panel-item.vue.js +1 -1
- package/dist/lib/src/components/panel/widget/array-table.vue2.js +1 -1
- package/dist/lib/src/components/panel/widget/grid.vue2.js +1 -1
- package/dist/lib/src/components/panel/widget/object.vue2.js +1 -1
- package/dist/lib/src/config/index.js +2 -2
- package/dist/lib/src/effects/effect-dict.js +1 -1
- package/dist/lib/src/effects/onEffects.js +1 -1
- package/dist/lib/src/hooks/index.js +1 -1
- package/dist/lib/src/hooks/use-actions.js +1 -0
- package/dist/lib/src/index.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/types/src/effects/effect-dict.d.ts +1 -0
- package/dist/types/src/effects/onEffects.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/use-actions.d.ts +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/es/index.mjs
CHANGED
|
@@ -4,22 +4,23 @@ import { default as a } from "./src/components/panel/panel-item.vue.mjs";
|
|
|
4
4
|
import { useInjectDesignContext as f } from "./src/context/design.mjs";
|
|
5
5
|
import { default as p } from "./src/components/form-desgin.mjs";
|
|
6
6
|
import { CreateFormDesign as i } from "./src/core/index.mjs";
|
|
7
|
-
import { default as
|
|
8
|
-
import { jsonToSchema as
|
|
9
|
-
import { BaseSchema as
|
|
10
|
-
import {
|
|
7
|
+
import { default as h } from "./src/components/props/form-config.vue.mjs";
|
|
8
|
+
import { jsonToSchema as u } from "./src/utils/schema.mjs";
|
|
9
|
+
import { BaseSchema as d, ExtendSchema as C, LayoutSchema as D, tempSchema as F } from "./src/config/index.mjs";
|
|
10
|
+
import { onDesignChange as I, onDesignFieldChange as j, onDesignInit as y } from "./src/effects/onEffects.mjs";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
d as BaseSchema,
|
|
13
13
|
t as Carousel,
|
|
14
14
|
i as CreateFormDesign,
|
|
15
15
|
C as ExtendSchema,
|
|
16
|
-
|
|
16
|
+
h as FormConfig,
|
|
17
17
|
p as FormDesign,
|
|
18
18
|
a as FormPanelItem,
|
|
19
19
|
D as LayoutSchema,
|
|
20
|
-
|
|
21
|
-
I as
|
|
22
|
-
j as
|
|
20
|
+
u as jsonToSchema,
|
|
21
|
+
I as onDesignChange,
|
|
22
|
+
j as onDesignFieldChange,
|
|
23
|
+
y as onDesignInit,
|
|
23
24
|
F as tempSchema,
|
|
24
25
|
f as useInjectDesignContext
|
|
25
26
|
};
|
|
@@ -1,73 +1,74 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, ref as v, nextTick as E, toRaw as R, openBlock as h, createElementBlock as C, normalizeClass as r, unref as e, createElementVNode as t, createVNode as s, withCtx as i, createCommentVNode as f, renderSlot as k, withDirectives as x, vShow as b } from "vue";
|
|
2
2
|
import "../internal.mjs";
|
|
3
|
-
import { Modal as
|
|
4
|
-
import
|
|
5
|
-
import { useInjectDragContext as
|
|
3
|
+
import { Modal as j, Tooltip as D, Form as B } from "ant-design-vue";
|
|
4
|
+
import J from "vuedraggable";
|
|
5
|
+
import { useInjectDragContext as O, useInjectDesignContext as M } from "../context/design.mjs";
|
|
6
6
|
import "./panel/panel-item.vue2.mjs";
|
|
7
|
-
import
|
|
7
|
+
import P from "./base/json-preview.vue.mjs";
|
|
8
8
|
import "./index.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { useDesignActions as q } from "../hooks/use-actions.mjs";
|
|
10
|
+
import { useNamespace as G } from "../hooks/use-namespace/index.mjs";
|
|
10
11
|
import S from "./form-icon.vue2.mjs";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
12
|
+
import H from "./panel/panel-item.vue.mjs";
|
|
13
|
+
const K = { class: "left" }, L = { class: "right" }, Q = { class: "content-panel" }, U = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "prompt"
|
|
15
|
-
},
|
|
16
|
+
}, W = { class: "form-item" }, X = { class: "content-editor" }, me = /* @__PURE__ */ z({
|
|
16
17
|
name: "FormPanel",
|
|
17
18
|
__name: "form-panel",
|
|
18
|
-
setup(
|
|
19
|
-
const p = v({}), { isDrag: w } =
|
|
20
|
-
function
|
|
21
|
-
d.value = !d.value,
|
|
19
|
+
setup(Y) {
|
|
20
|
+
const p = v({}), { isDrag: w } = O(), d = v(!1), a = M(), { fields: c } = a, { dragAddAction: y, clearFieldsAction: A } = q(a);
|
|
21
|
+
function F() {
|
|
22
|
+
d.value = !d.value, E(() => {
|
|
22
23
|
p.value = a.getFormSchema();
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
|
-
const { b:
|
|
26
|
-
function
|
|
27
|
-
const n =
|
|
26
|
+
const { b: $, e: u, em: g } = G("panel");
|
|
27
|
+
function I(l, o) {
|
|
28
|
+
const n = R(l), { oldIndex: V } = o, m = n[V];
|
|
28
29
|
if (m) {
|
|
29
30
|
const { shared: _ } = a;
|
|
30
31
|
_.draggedContext.key = m.key, _.draggedContext.field = m;
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
async function
|
|
34
|
-
const { shared: l } = a, { field:
|
|
35
|
-
source:
|
|
36
|
-
traget:
|
|
34
|
+
async function N() {
|
|
35
|
+
const { shared: l } = a, { field: o } = l.draggedContext, n = {
|
|
36
|
+
source: o,
|
|
37
|
+
traget: c.value,
|
|
37
38
|
region: "form-panel"
|
|
38
39
|
};
|
|
39
|
-
a.hooks.syncDragAdd.call(n), a.setCheckedField(
|
|
40
|
+
a.hooks.syncDragAdd.call(n), a.setCheckedField(o), y();
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
42
|
+
function T() {
|
|
43
|
+
j.confirm({
|
|
43
44
|
title: "提示?",
|
|
44
45
|
content: "确定要清空所有字段吗?",
|
|
45
46
|
okText: "确定",
|
|
46
47
|
cancelText: "取消",
|
|
47
48
|
onOk() {
|
|
48
|
-
|
|
49
|
+
A();
|
|
49
50
|
},
|
|
50
51
|
onCancel() {
|
|
51
52
|
console.log("Cancel");
|
|
52
53
|
}
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
|
-
return (l,
|
|
56
|
+
return (l, o) => (h(), C(
|
|
56
57
|
"div",
|
|
57
58
|
{
|
|
58
|
-
class:
|
|
59
|
+
class: r(e($)())
|
|
59
60
|
},
|
|
60
61
|
[
|
|
61
|
-
|
|
62
|
+
t(
|
|
62
63
|
"div",
|
|
63
64
|
{
|
|
64
|
-
class:
|
|
65
|
+
class: r(e(u)("toolbar"))
|
|
65
66
|
},
|
|
66
67
|
[
|
|
67
|
-
|
|
68
|
+
t("div", K, [
|
|
68
69
|
s(e(D), { placement: "bottom" }, {
|
|
69
|
-
title: i(() =>
|
|
70
|
-
|
|
70
|
+
title: i(() => o[1] || (o[1] = [
|
|
71
|
+
t(
|
|
71
72
|
"span",
|
|
72
73
|
null,
|
|
73
74
|
"全部删除",
|
|
@@ -78,17 +79,17 @@ const q = { class: "left" }, G = { class: "right" }, H = { class: "content-panel
|
|
|
78
79
|
default: i(() => [
|
|
79
80
|
s(e(S), {
|
|
80
81
|
name: "delete1",
|
|
81
|
-
class:
|
|
82
|
+
class: r(e(g)("toolbar", "icon")),
|
|
82
83
|
size: 18,
|
|
83
|
-
onClick:
|
|
84
|
+
onClick: T
|
|
84
85
|
}, null, 8, ["class"])
|
|
85
86
|
]),
|
|
86
87
|
_: 1
|
|
87
88
|
/* STABLE */
|
|
88
89
|
}),
|
|
89
90
|
s(e(D), { placement: "bottom" }, {
|
|
90
|
-
title: i(() =>
|
|
91
|
-
|
|
91
|
+
title: i(() => o[2] || (o[2] = [
|
|
92
|
+
t(
|
|
92
93
|
"span",
|
|
93
94
|
null,
|
|
94
95
|
"查看JSON Schema",
|
|
@@ -99,9 +100,9 @@ const q = { class: "left" }, G = { class: "right" }, H = { class: "content-panel
|
|
|
99
100
|
default: i(() => [
|
|
100
101
|
s(e(S), {
|
|
101
102
|
name: "code",
|
|
102
|
-
class:
|
|
103
|
+
class: r(e(g)("toolbar", "icon")),
|
|
103
104
|
size: 18,
|
|
104
|
-
onClick:
|
|
105
|
+
onClick: F
|
|
105
106
|
}, null, 8, ["class"])
|
|
106
107
|
]),
|
|
107
108
|
_: 1
|
|
@@ -110,7 +111,7 @@ const q = { class: "left" }, G = { class: "right" }, H = { class: "content-panel
|
|
|
110
111
|
f(` <FormIcon name="desktop" />
|
|
111
112
|
<FormIcon name="mobile" /> `)
|
|
112
113
|
]),
|
|
113
|
-
|
|
114
|
+
t("div", L, [
|
|
114
115
|
k(l.$slots, "toolbar")
|
|
115
116
|
])
|
|
116
117
|
],
|
|
@@ -118,40 +119,40 @@ const q = { class: "left" }, G = { class: "right" }, H = { class: "content-panel
|
|
|
118
119
|
/* CLASS */
|
|
119
120
|
),
|
|
120
121
|
f(' ref="contentTelRef" '),
|
|
121
|
-
|
|
122
|
+
t(
|
|
122
123
|
"div",
|
|
123
124
|
{
|
|
124
|
-
class:
|
|
125
|
+
class: r(e(u)("content"))
|
|
125
126
|
},
|
|
126
127
|
[
|
|
127
|
-
x(
|
|
128
|
+
x(t(
|
|
128
129
|
"div",
|
|
129
|
-
|
|
130
|
+
Q,
|
|
130
131
|
[
|
|
131
|
-
!e(w) && e(
|
|
132
|
-
s(e(
|
|
132
|
+
!e(w) && e(c).length === 0 ? (h(), C("div", U, " 👈 请在左侧选择控件并拖至此处 ")) : f("v-if", !0),
|
|
133
|
+
s(e(B), {
|
|
133
134
|
autocomplete: "off",
|
|
134
135
|
class: "design-from",
|
|
135
136
|
"label-align": "left"
|
|
136
137
|
}, {
|
|
137
138
|
default: i(() => [
|
|
138
|
-
s(e(
|
|
139
|
+
s(e(J), {
|
|
139
140
|
class: "drag-from",
|
|
140
|
-
list: e(
|
|
141
|
+
list: e(c),
|
|
141
142
|
group: { name: "form" },
|
|
142
143
|
animation: 300,
|
|
143
144
|
sort: !0,
|
|
144
145
|
"item-key": "id",
|
|
145
146
|
"chosen-class": "choose",
|
|
146
|
-
onStart:
|
|
147
|
-
onAdd:
|
|
147
|
+
onStart: o[0] || (o[0] = (n) => I(e(c), n)),
|
|
148
|
+
onAdd: N
|
|
148
149
|
}, {
|
|
149
150
|
item: i(({ element: n }) => [
|
|
150
|
-
|
|
151
|
+
t("div", W, [
|
|
151
152
|
k(l.$slots, `panel-${n.key}`, {}, () => [
|
|
152
|
-
s(
|
|
153
|
+
s(H, {
|
|
153
154
|
field: n,
|
|
154
|
-
space: e(
|
|
155
|
+
space: e(c)
|
|
155
156
|
}, null, 8, ["field", "space"])
|
|
156
157
|
])
|
|
157
158
|
])
|
|
@@ -169,11 +170,11 @@ const q = { class: "left" }, G = { class: "right" }, H = { class: "content-panel
|
|
|
169
170
|
), [
|
|
170
171
|
[b, !d.value]
|
|
171
172
|
]),
|
|
172
|
-
x(
|
|
173
|
+
x(t(
|
|
173
174
|
"div",
|
|
174
|
-
|
|
175
|
+
X,
|
|
175
176
|
[
|
|
176
|
-
s(
|
|
177
|
+
s(P, { data: p.value }, null, 8, ["data"])
|
|
177
178
|
],
|
|
178
179
|
512
|
|
179
180
|
/* NEED_PATCH */
|
|
@@ -191,5 +192,5 @@ const q = { class: "left" }, G = { class: "right" }, H = { class: "content-panel
|
|
|
191
192
|
}
|
|
192
193
|
});
|
|
193
194
|
export {
|
|
194
|
-
|
|
195
|
+
me as default
|
|
195
196
|
};
|
|
@@ -1,64 +1,66 @@
|
|
|
1
|
-
import { defineComponent as V, computed as g, openBlock as
|
|
2
|
-
import { FormItem as
|
|
1
|
+
import { defineComponent as V, computed as g, openBlock as o, createElementBlock as b, normalizeClass as p, withModifiers as j, unref as t, createBlock as a, resolveDynamicComponent as w, withCtx as D, createElementVNode as $, createCommentVNode as c, createVNode as x, defineAsyncComponent as M } from "vue";
|
|
2
|
+
import { FormItem as O, Tooltip as S } from "ant-design-vue";
|
|
3
3
|
import "../../internal.mjs";
|
|
4
|
-
import { useInjectDesignContext as
|
|
4
|
+
import { useInjectDesignContext as W } from "../../context/design.mjs";
|
|
5
5
|
import "../index.mjs";
|
|
6
|
-
import
|
|
6
|
+
import "../../hooks/index.mjs";
|
|
7
|
+
import { useNamespace as q } from "../../hooks/use-namespace/index.mjs";
|
|
7
8
|
import m from "../form-icon.vue2.mjs";
|
|
8
|
-
|
|
9
|
+
import { useDesignActions as G } from "../../hooks/use-actions.mjs";
|
|
10
|
+
const H = {
|
|
9
11
|
key: 2,
|
|
10
12
|
class: "icons"
|
|
11
|
-
},
|
|
13
|
+
}, _ = /* @__PURE__ */ V({
|
|
12
14
|
__name: "panel-item",
|
|
13
15
|
props: {
|
|
14
16
|
field: {},
|
|
15
17
|
space: {},
|
|
16
18
|
hideTitle: { type: Boolean }
|
|
17
19
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
+
setup(z) {
|
|
21
|
+
const n = z, { b: B, e: u, m: v } = q("panel-item"), d = W(), { checkedField: r, shared: F } = d, { deleteFieldAction: I } = G(d);
|
|
20
22
|
function N(e, i = {}) {
|
|
21
23
|
return Object.entries(e).forEach(([l, s]) => {
|
|
22
|
-
typeof s == "function" ? i[l] =
|
|
24
|
+
typeof s == "function" ? i[l] = M(s) : i[l] = s;
|
|
23
25
|
}), i;
|
|
24
26
|
}
|
|
25
|
-
const k = N(
|
|
26
|
-
function
|
|
27
|
-
|
|
27
|
+
const k = N(F.panelWidgets);
|
|
28
|
+
function A(e) {
|
|
29
|
+
d.setCheckedField(e), I();
|
|
28
30
|
}
|
|
29
31
|
const f = g(() => {
|
|
30
32
|
var i, l;
|
|
31
|
-
return ((l = (i =
|
|
32
|
-
}),
|
|
33
|
+
return ((l = (i = n.field["x-design-props"]) == null ? void 0 : i.validate) == null ? void 0 : l.status) === "error";
|
|
34
|
+
}), E = g(() => {
|
|
33
35
|
var i;
|
|
34
|
-
const e = [
|
|
35
|
-
return ((i =
|
|
36
|
+
const e = [B()];
|
|
37
|
+
return ((i = r.value) == null ? void 0 : i.id) === n.field.id && e.push(v("active")), f.value && e.push(v("error")), e;
|
|
36
38
|
});
|
|
37
39
|
function T() {
|
|
38
|
-
if (!
|
|
40
|
+
if (!d.hooks.beforeDelete.call(n.field))
|
|
39
41
|
return;
|
|
40
|
-
const i =
|
|
41
|
-
i !== -1 &&
|
|
42
|
+
const i = n.space.findIndex((l) => l.id === n.field.id);
|
|
43
|
+
i !== -1 && n.space.splice(i, 1);
|
|
42
44
|
}
|
|
43
45
|
return (e, i) => {
|
|
44
46
|
var l, s, C, h, y;
|
|
45
|
-
return
|
|
47
|
+
return o(), b(
|
|
46
48
|
"div",
|
|
47
49
|
{
|
|
48
|
-
class: p(
|
|
49
|
-
onClick: i[0] || (i[0] = j((
|
|
50
|
+
class: p(E.value),
|
|
51
|
+
onClick: i[0] || (i[0] = j((J) => A(e.field), ["stop"]))
|
|
50
52
|
},
|
|
51
53
|
[
|
|
52
|
-
t(k)[e.field.key] ? (
|
|
54
|
+
t(k)[e.field.key] ? (o(), a(w(t(k)[e.field.key]), {
|
|
53
55
|
key: 0,
|
|
54
56
|
"hide-title": e.hideTitle,
|
|
55
57
|
field: e.field
|
|
56
|
-
}, null, 8, ["hide-title", "field"])) : (
|
|
58
|
+
}, null, 8, ["hide-title", "field"])) : (o(), a(t(O), {
|
|
57
59
|
key: 1,
|
|
58
60
|
class: p(t(u)("form")),
|
|
59
61
|
label: e.field.title
|
|
60
62
|
}, {
|
|
61
|
-
default:
|
|
63
|
+
default: D(() => [
|
|
62
64
|
$(
|
|
63
65
|
"div",
|
|
64
66
|
{
|
|
@@ -72,36 +74,36 @@ const q = {
|
|
|
72
74
|
_: 1
|
|
73
75
|
/* STABLE */
|
|
74
76
|
}, 8, ["class", "label"])),
|
|
75
|
-
((l = t(
|
|
76
|
-
((s = t(
|
|
77
|
+
((l = t(r)) == null ? void 0 : l.id) === e.field.id || f.value ? (o(), b("div", H, [
|
|
78
|
+
((s = t(r)) == null ? void 0 : s.id) === e.field.id ? (o(), a(t(m), {
|
|
77
79
|
key: 0,
|
|
78
80
|
name: "copy",
|
|
79
81
|
class: "panel-icon",
|
|
80
82
|
size: 15
|
|
81
|
-
})) :
|
|
82
|
-
((C = t(
|
|
83
|
+
})) : c("v-if", !0),
|
|
84
|
+
((C = t(r)) == null ? void 0 : C.id) === e.field.id ? (o(), a(t(m), {
|
|
83
85
|
key: 1,
|
|
84
86
|
name: "delete1",
|
|
85
87
|
class: "panel-icon",
|
|
86
88
|
size: 15,
|
|
87
89
|
onClick: T
|
|
88
|
-
})) :
|
|
89
|
-
x(t(
|
|
90
|
+
})) : c("v-if", !0),
|
|
91
|
+
x(t(S), {
|
|
90
92
|
title: (y = (h = e.field["x-design-props"]) == null ? void 0 : h.validate) == null ? void 0 : y.message,
|
|
91
93
|
color: "pink"
|
|
92
94
|
}, {
|
|
93
|
-
default:
|
|
94
|
-
f.value ? (
|
|
95
|
+
default: D(() => [
|
|
96
|
+
f.value ? (o(), a(t(m), {
|
|
95
97
|
key: 0,
|
|
96
98
|
name: "exclamation-circle-filled",
|
|
97
99
|
size: 13,
|
|
98
100
|
class: "panel-exclamation-icon"
|
|
99
|
-
})) :
|
|
101
|
+
})) : c("v-if", !0)
|
|
100
102
|
]),
|
|
101
103
|
_: 1
|
|
102
104
|
/* STABLE */
|
|
103
105
|
}, 8, ["title"])
|
|
104
|
-
])) :
|
|
106
|
+
])) : c("v-if", !0)
|
|
105
107
|
],
|
|
106
108
|
2
|
|
107
109
|
/* CLASS */
|
|
@@ -110,5 +112,5 @@ const q = {
|
|
|
110
112
|
}
|
|
111
113
|
});
|
|
112
114
|
export {
|
|
113
|
-
|
|
115
|
+
_ as default
|
|
114
116
|
};
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as p, openBlock as u, createElementBlock as b, normalizeClass as y, unref as n, createElementVNode as e, createVNode as l, withCtx as h, renderSlot as v, toDisplayString as x } from "vue";
|
|
2
|
+
import A from "vuedraggable";
|
|
3
3
|
import "../../../index.mjs";
|
|
4
4
|
import "../../../internal.mjs";
|
|
5
5
|
import { message as C } from "ant-design-vue";
|
|
6
6
|
import { useInjectDesignContext as k } from "../../../context/design.mjs";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import
|
|
9
|
-
|
|
7
|
+
import { useNamespace as D } from "../../../hooks/use-namespace/index.mjs";
|
|
8
|
+
import { useDesignActions as _ } from "../../../hooks/use-actions.mjs";
|
|
9
|
+
import w from "../panel-item.vue.mjs";
|
|
10
|
+
const I = { class: "array-table-box" }, N = { class: "array-table-drag" }, $ = { class: "form-item" }, B = { class: "table-item" }, E = { class: "array-table-drag-header" }, S = { class: "array-table-drag-content" }, J = /* @__PURE__ */ p({
|
|
10
11
|
name: "ArrayTable",
|
|
11
12
|
__name: "array-table",
|
|
12
13
|
props: {
|
|
13
14
|
field: {}
|
|
14
15
|
},
|
|
15
16
|
setup(d) {
|
|
16
|
-
const s = k(), { b: c } =
|
|
17
|
+
const s = k(), { b: c } = D("array-table"), { dragAddAction: m } = _(s);
|
|
17
18
|
function f() {
|
|
18
|
-
const { shared:
|
|
19
|
+
const { shared: a } = s, { field: t } = a.draggedContext, i = {
|
|
19
20
|
source: t,
|
|
20
21
|
traget: d.field.children,
|
|
21
22
|
region: "k-array-card"
|
|
22
23
|
};
|
|
23
|
-
if (s.hooks.syncDragAdd.call(i), !s.dragAddResult.every((
|
|
24
|
-
const
|
|
25
|
-
|
|
24
|
+
if (s.hooks.syncDragAdd.call(i), !s.dragAddResult.every((r) => r)) {
|
|
25
|
+
const r = d.field.children.findIndex((g) => g.id === t.id);
|
|
26
|
+
r !== -1 && (d.field.children.splice(r, 1), C.warning("不能将该控件拖拽到列表容器中"));
|
|
26
27
|
}
|
|
27
|
-
const o = d.field.children.find((
|
|
28
|
+
const o = d.field.children.find((r) => r.id === t.id);
|
|
28
29
|
if (o) {
|
|
29
|
-
const
|
|
30
|
+
const r = o["x-decorator-props"] || {};
|
|
30
31
|
o["x-decorator-props"] = {
|
|
31
|
-
...
|
|
32
|
+
...r,
|
|
32
33
|
hideTitle: !0
|
|
33
34
|
};
|
|
34
35
|
}
|
|
36
|
+
m();
|
|
35
37
|
}
|
|
36
|
-
return (
|
|
38
|
+
return (a, t) => (u(), b(
|
|
37
39
|
"div",
|
|
38
40
|
{
|
|
39
|
-
class:
|
|
41
|
+
class: y(n(c)())
|
|
40
42
|
},
|
|
41
43
|
[
|
|
42
44
|
t[1] || (t[1] = e(
|
|
@@ -46,7 +48,7 @@ const D = { class: "array-table-box" }, w = { class: "array-table-drag" }, I = {
|
|
|
46
48
|
-1
|
|
47
49
|
/* CACHED */
|
|
48
50
|
)),
|
|
49
|
-
e("div",
|
|
51
|
+
e("div", I, [
|
|
50
52
|
t[0] || (t[0] = e(
|
|
51
53
|
"div",
|
|
52
54
|
{ class: "array-table-left" },
|
|
@@ -57,10 +59,10 @@ const D = { class: "array-table-box" }, w = { class: "array-table-drag" }, I = {
|
|
|
57
59
|
-1
|
|
58
60
|
/* CACHED */
|
|
59
61
|
)),
|
|
60
|
-
e("div",
|
|
61
|
-
n(
|
|
62
|
+
e("div", N, [
|
|
63
|
+
l(n(A), {
|
|
62
64
|
class: "widget-drag",
|
|
63
|
-
list:
|
|
65
|
+
list: a.field.children,
|
|
64
66
|
group: { name: "form", direction: "vertical", removeCloneOnHide: !1 },
|
|
65
67
|
animation: 300,
|
|
66
68
|
sort: !0,
|
|
@@ -68,21 +70,21 @@ const D = { class: "array-table-box" }, w = { class: "array-table-drag" }, I = {
|
|
|
68
70
|
"drag-class": "table-item-drag-class",
|
|
69
71
|
onAdd: f
|
|
70
72
|
}, {
|
|
71
|
-
item:
|
|
72
|
-
e("div",
|
|
73
|
-
|
|
74
|
-
e("div",
|
|
73
|
+
item: h(({ element: i }) => [
|
|
74
|
+
e("div", $, [
|
|
75
|
+
v(a.$slots, `panel-${i.key}`, {}, () => [
|
|
76
|
+
e("div", B, [
|
|
75
77
|
e(
|
|
76
78
|
"div",
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
E,
|
|
80
|
+
x(i.title),
|
|
79
81
|
1
|
|
80
82
|
/* TEXT */
|
|
81
83
|
),
|
|
82
|
-
e("div",
|
|
83
|
-
n(
|
|
84
|
+
e("div", S, [
|
|
85
|
+
l(n(w), {
|
|
84
86
|
field: i,
|
|
85
|
-
space:
|
|
87
|
+
space: a.field.children,
|
|
86
88
|
"hide-title": ""
|
|
87
89
|
}, null, 8, ["field", "space"])
|
|
88
90
|
])
|
|
@@ -109,5 +111,5 @@ const D = { class: "array-table-box" }, w = { class: "array-table-drag" }, I = {
|
|
|
109
111
|
}
|
|
110
112
|
});
|
|
111
113
|
export {
|
|
112
|
-
|
|
114
|
+
J as default
|
|
113
115
|
};
|