@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,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { FormItem as
|
|
1
|
+
import { defineComponent as V, computed as g, openBlock as n, createElementBlock as b, normalizeClass as p, withModifiers as j, unref as t, createBlock as a, resolveDynamicComponent as x, withCtx as z, createElementVNode as $, createCommentVNode as r, createVNode as A, 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 T } from "../../context/design.mjs";
|
|
5
5
|
import "../index.mjs";
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
6
|
+
import { useNamespace as W } from "../../hooks/use-namespace/index.mjs";
|
|
7
|
+
import m from "../form-icon.vue2.mjs";
|
|
8
|
+
const _ = {
|
|
9
9
|
key: 2,
|
|
10
10
|
class: "icons"
|
|
11
|
-
}, R = /* @__PURE__ */
|
|
11
|
+
}, R = /* @__PURE__ */ V({
|
|
12
12
|
__name: "panel-item",
|
|
13
13
|
props: {
|
|
14
14
|
field: {},
|
|
15
15
|
space: {}
|
|
16
16
|
},
|
|
17
17
|
setup(D) {
|
|
18
|
-
const o = D, { b: I, e:
|
|
18
|
+
const o = D, { b: I, e: u, m: v } = W("panel-item"), c = T(), { checkedField: d, shared: N } = c;
|
|
19
19
|
function w(e, i = {}) {
|
|
20
20
|
return Object.entries(e).forEach(([l, s]) => {
|
|
21
|
-
typeof s == "function" ? i[l] =
|
|
21
|
+
typeof s == "function" ? i[l] = M(s) : i[l] = s;
|
|
22
22
|
}), i;
|
|
23
23
|
}
|
|
24
24
|
const k = w(N.panelWidgets);
|
|
25
25
|
function B(e) {
|
|
26
|
-
|
|
26
|
+
c.setCheckedField(e);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const f = g(() => {
|
|
29
29
|
var i, l;
|
|
30
|
-
return ((l = (i = o.field["
|
|
30
|
+
return ((l = (i = o.field["x-design-props"]) == null ? void 0 : i.validate) == null ? void 0 : l.status) === "error";
|
|
31
31
|
}), E = g(() => {
|
|
32
32
|
var i;
|
|
33
33
|
const e = [I()];
|
|
34
|
-
return ((i =
|
|
34
|
+
return ((i = d.value) == null ? void 0 : i.id) === o.field.id && e.push(v("active")), f.value && e.push(v("error")), e;
|
|
35
35
|
});
|
|
36
|
-
function
|
|
37
|
-
if (!
|
|
36
|
+
function F() {
|
|
37
|
+
if (!c.hooks.beforeDelete.call(o.field))
|
|
38
38
|
return;
|
|
39
39
|
const i = o.space.findIndex((l) => l.id === o.field.id);
|
|
40
40
|
i !== -1 && o.space.splice(i, 1);
|
|
@@ -44,25 +44,25 @@ const q = {
|
|
|
44
44
|
return n(), b(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
|
-
class:
|
|
48
|
-
onClick: i[0] || (i[0] =
|
|
47
|
+
class: p(E.value),
|
|
48
|
+
onClick: i[0] || (i[0] = j((q) => B(e.field), ["stop"]))
|
|
49
49
|
},
|
|
50
50
|
[
|
|
51
|
-
t(k)[e.field.key] ? (n(),
|
|
51
|
+
t(k)[e.field.key] ? (n(), a(x(t(k)[e.field.key]), {
|
|
52
52
|
key: 0,
|
|
53
53
|
style: { width: "100%" },
|
|
54
54
|
readonly: "",
|
|
55
55
|
field: e.field
|
|
56
|
-
}, null, 8, ["field"])) : (n(),
|
|
56
|
+
}, null, 8, ["field"])) : (n(), a(t(O), {
|
|
57
57
|
key: 1,
|
|
58
|
-
class:
|
|
58
|
+
class: p(t(u)("form")),
|
|
59
59
|
label: e.field.title
|
|
60
60
|
}, {
|
|
61
61
|
default: z(() => [
|
|
62
|
-
|
|
62
|
+
$(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
|
-
class:
|
|
65
|
+
class: p(t(u)("error"))
|
|
66
66
|
},
|
|
67
67
|
" 未定义组件 ",
|
|
68
68
|
2
|
|
@@ -72,26 +72,26 @@ const q = {
|
|
|
72
72
|
_: 1
|
|
73
73
|
/* STABLE */
|
|
74
74
|
}, 8, ["class", "label"])),
|
|
75
|
-
((l = t(
|
|
76
|
-
((s = t(
|
|
75
|
+
((l = t(d)) == null ? void 0 : l.id) === e.field.id || f.value ? (n(), b("div", _, [
|
|
76
|
+
((s = t(d)) == null ? void 0 : s.id) === e.field.id ? (n(), a(t(m), {
|
|
77
77
|
key: 0,
|
|
78
78
|
name: "copy",
|
|
79
79
|
class: "panel-icon",
|
|
80
80
|
size: 15
|
|
81
81
|
})) : r("v-if", !0),
|
|
82
|
-
((y = t(
|
|
82
|
+
((y = t(d)) == null ? void 0 : y.id) === e.field.id ? (n(), a(t(m), {
|
|
83
83
|
key: 1,
|
|
84
84
|
name: "delete1",
|
|
85
85
|
class: "panel-icon",
|
|
86
86
|
size: 15,
|
|
87
|
-
onClick:
|
|
87
|
+
onClick: F
|
|
88
88
|
})) : r("v-if", !0),
|
|
89
|
-
|
|
90
|
-
title: (h = (C = e.field["
|
|
89
|
+
A(t(S), {
|
|
90
|
+
title: (h = (C = e.field["x-design-props"]) == null ? void 0 : C.validate) == null ? void 0 : h.message,
|
|
91
91
|
color: "pink"
|
|
92
92
|
}, {
|
|
93
93
|
default: z(() => [
|
|
94
|
-
|
|
94
|
+
f.value ? (n(), a(t(m), {
|
|
95
95
|
key: 0,
|
|
96
96
|
name: "exclamation-circle-filled",
|
|
97
97
|
size: 13,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as o, openBlock as t, createBlock as a, unref as r, withCtx as n, createVNode as l, normalizeProps as p, guardReactiveProps as i } from "vue";
|
|
2
|
+
import { FormItem as m, RangePicker as c } from "ant-design-vue";
|
|
3
|
+
const _ = /* @__PURE__ */ o({
|
|
4
|
+
__name: "date-range",
|
|
5
|
+
props: {
|
|
6
|
+
field: {}
|
|
7
|
+
},
|
|
8
|
+
setup(f) {
|
|
9
|
+
return (e, d) => (t(), a(r(m), {
|
|
10
|
+
label: e.field.title
|
|
11
|
+
}, {
|
|
12
|
+
default: n(() => [
|
|
13
|
+
l(
|
|
14
|
+
r(c),
|
|
15
|
+
p(i(e.field["x-component-props"])),
|
|
16
|
+
null,
|
|
17
|
+
16
|
|
18
|
+
/* FULL_PROPS */
|
|
19
|
+
)
|
|
20
|
+
]),
|
|
21
|
+
_: 1
|
|
22
|
+
/* STABLE */
|
|
23
|
+
}, 8, ["label"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
_ as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as t, createBlock as l, unref as o, withCtx as a, createVNode as n, normalizeProps as p, guardReactiveProps as i } from "vue";
|
|
2
|
+
import { FormItem as m, DatePicker as c } from "ant-design-vue";
|
|
3
|
+
const _ = /* @__PURE__ */ r({
|
|
4
|
+
__name: "date-single",
|
|
5
|
+
props: {
|
|
6
|
+
field: {}
|
|
7
|
+
},
|
|
8
|
+
setup(f) {
|
|
9
|
+
return (e, s) => (t(), l(o(m), {
|
|
10
|
+
label: e.field.title
|
|
11
|
+
}, {
|
|
12
|
+
default: a(() => [
|
|
13
|
+
n(
|
|
14
|
+
o(c),
|
|
15
|
+
p(i(e.field["x-component-props"])),
|
|
16
|
+
null,
|
|
17
|
+
16
|
|
18
|
+
/* FULL_PROPS */
|
|
19
|
+
)
|
|
20
|
+
]),
|
|
21
|
+
_: 1
|
|
22
|
+
/* STABLE */
|
|
23
|
+
}, 8, ["label"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
_ as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as f, defineAsyncComponent as m, openBlock as t, createElementBlock as s, normalizeClass as u, unref as i, Fragment as C, renderList as k, createBlock as y, resolveDynamicComponent as _ } from "vue";
|
|
2
|
+
import "../../../internal.mjs";
|
|
3
|
+
import { useInjectDesignContext as g } from "../../../context/design.mjs";
|
|
4
|
+
import { useNamespace as h } from "../../../hooks/use-namespace/index.mjs";
|
|
5
|
+
const D = /* @__PURE__ */ f({
|
|
6
|
+
__name: "kit",
|
|
7
|
+
props: {
|
|
8
|
+
field: {}
|
|
9
|
+
},
|
|
10
|
+
setup(v) {
|
|
11
|
+
const { b: l } = h("kit-panel"), c = g(), { shared: a } = c;
|
|
12
|
+
function d(o, n = {}) {
|
|
13
|
+
return Object.entries(o).forEach(([e, r]) => {
|
|
14
|
+
typeof r == "function" ? n[e] = m(r) : n[e] = r;
|
|
15
|
+
}), n;
|
|
16
|
+
}
|
|
17
|
+
const p = d(a.panelWidgets);
|
|
18
|
+
return (o, n) => (t(), s(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
class: u(i(l)())
|
|
22
|
+
},
|
|
23
|
+
[
|
|
24
|
+
(t(!0), s(
|
|
25
|
+
C,
|
|
26
|
+
null,
|
|
27
|
+
k(o.field.children, (e) => (t(), s("div", {
|
|
28
|
+
key: e.id,
|
|
29
|
+
class: "kit-item"
|
|
30
|
+
}, [
|
|
31
|
+
(t(), y(_(i(p)[e.key]), {
|
|
32
|
+
style: { width: "100%" },
|
|
33
|
+
readonly: "",
|
|
34
|
+
field: e
|
|
35
|
+
}, null, 8, ["field"]))
|
|
36
|
+
]))),
|
|
37
|
+
128
|
|
38
|
+
/* KEYED_FRAGMENT */
|
|
39
|
+
))
|
|
40
|
+
],
|
|
41
|
+
2
|
|
42
|
+
/* CLASS */
|
|
43
|
+
));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
D as default
|
|
48
|
+
};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as f, toRaw as u, openBlock as g, createElementBlock as h, createElementVNode as n, toDisplayString as k, createVNode as s, unref as r, normalizeClass as y, withCtx as C, renderSlot as b } from "vue";
|
|
2
|
+
import v from "vuedraggable";
|
|
3
3
|
import "../../../internal.mjs";
|
|
4
4
|
import "../../../index.mjs";
|
|
5
|
-
import { useInjectDesignContext as
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
5
|
+
import { useInjectDesignContext as w } from "../../../context/design.mjs";
|
|
6
|
+
import { useNamespace as x } from "../../../hooks/use-namespace/index.mjs";
|
|
7
|
+
import S from "../panel-item.vue.mjs";
|
|
8
|
+
const _ = { class: "form-item" }, V = /* @__PURE__ */ f({
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "object",
|
|
11
11
|
props: {
|
|
12
12
|
field: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
function
|
|
14
|
+
setup(D) {
|
|
15
|
+
const l = w(), { b: a } = x("panel-drag");
|
|
16
|
+
function d() {
|
|
17
17
|
return !0;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const o =
|
|
21
|
-
if (
|
|
22
|
-
const { shared:
|
|
23
|
-
|
|
19
|
+
function p(e, t) {
|
|
20
|
+
const o = u(e), { oldIndex: m } = t, i = o[m];
|
|
21
|
+
if (i) {
|
|
22
|
+
const { shared: c } = l;
|
|
23
|
+
c.draggedContext.key = i.key;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return (e, t) => (g(), h("div", null, [
|
|
27
27
|
n(
|
|
28
28
|
"div",
|
|
29
29
|
null,
|
|
30
|
-
|
|
30
|
+
k(e.field.title),
|
|
31
31
|
1
|
|
32
32
|
/* TEXT */
|
|
33
33
|
),
|
|
34
34
|
n("div", null, [
|
|
35
|
-
|
|
35
|
+
s(r(v), {
|
|
36
36
|
list: e.field.children,
|
|
37
|
-
class:
|
|
38
|
-
group: { name: "form", put:
|
|
37
|
+
class: y(r(a)()),
|
|
38
|
+
group: { name: "form", put: d },
|
|
39
39
|
animation: 300,
|
|
40
40
|
sort: !0,
|
|
41
41
|
"item-key": "id",
|
|
42
42
|
"chosen-class": "choose",
|
|
43
|
-
onStart: t[0] || (t[0] = (o) =>
|
|
43
|
+
onStart: t[0] || (t[0] = (o) => p(e.field.children, o))
|
|
44
44
|
}, {
|
|
45
|
-
item:
|
|
46
|
-
n("div",
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
item: C(({ element: o }) => [
|
|
46
|
+
n("div", _, [
|
|
47
|
+
b(e.$slots, `panel-${o.key}`, {}, () => [
|
|
48
|
+
s(r(S), {
|
|
49
49
|
field: o,
|
|
50
50
|
space: e.field.children
|
|
51
51
|
}, null, 8, ["field", "space"])
|
|
@@ -67,5 +67,5 @@ const N = { class: "form-item" }, _ = /* @__PURE__ */ u({
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
V as default
|
|
71
71
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as p, toRef as r, openBlock as l, createBlock as s, unref as o, withCtx as i, createVNode as c, mergeProps as f } from "vue";
|
|
2
2
|
import { FormItem as m, Select as a } from "ant-design-vue";
|
|
3
|
-
const
|
|
3
|
+
const h = /* @__PURE__ */ p({
|
|
4
4
|
__name: "select",
|
|
5
5
|
props: {
|
|
6
6
|
field: {}
|
|
@@ -11,7 +11,7 @@ const b = /* @__PURE__ */ p({
|
|
|
11
11
|
label: e.field.title
|
|
12
12
|
}, {
|
|
13
13
|
default: i(() => [
|
|
14
|
-
c(o(a), f(e.field["
|
|
14
|
+
c(o(a), f(e.field["x-component-props"], { options: n.value }), null, 16, ["options"])
|
|
15
15
|
]),
|
|
16
16
|
_: 1
|
|
17
17
|
/* STABLE */
|
|
@@ -19,5 +19,5 @@ const b = /* @__PURE__ */ p({
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
h as default
|
|
23
23
|
};
|
|
@@ -1,53 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as i, openBlock as u, createBlock as d, unref as e, withCtx as l, createVNode as o, createTextVNode as m } from "vue";
|
|
2
|
+
import { Form as p, FormItem as a, Input as s, Switch as c } from "ant-design-vue";
|
|
3
3
|
import "../../../internal.mjs";
|
|
4
4
|
import "../../form-icon.vue.mjs";
|
|
5
|
-
import { useInjectDesignContext as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
5
|
+
import { useInjectDesignContext as f } from "../../../context/design.mjs";
|
|
6
|
+
import x from "../../form-icon.vue2.mjs";
|
|
7
|
+
const I = /* @__PURE__ */ i({
|
|
8
8
|
__name: "BaseProps",
|
|
9
|
-
setup(
|
|
10
|
-
const { checkedField: r } =
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
null,
|
|
16
|
-
"基础设置",
|
|
17
|
-
-1
|
|
18
|
-
/* CACHED */
|
|
19
|
-
)
|
|
20
|
-
])),
|
|
9
|
+
setup(_) {
|
|
10
|
+
const { checkedField: r } = f();
|
|
11
|
+
return (k, t) => (u(), d(e(p), {
|
|
12
|
+
"label-col": { style: { width: "85px" } },
|
|
13
|
+
layout: "vertical"
|
|
14
|
+
}, {
|
|
21
15
|
default: l(() => [
|
|
22
|
-
o(e(
|
|
23
|
-
"label-col": { style: { width: "85px" } },
|
|
24
|
-
layout: "vertical"
|
|
25
|
-
}, {
|
|
16
|
+
o(e(a), { label: "字段标题" }, {
|
|
26
17
|
default: l(() => [
|
|
27
|
-
o(e(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
o(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"onUpdate:checked": t[1] || (t[1] = (n) => e(r).required = n)
|
|
46
|
-
}, null, 8, ["checked"])
|
|
47
|
-
]),
|
|
48
|
-
_: 1
|
|
49
|
-
/* STABLE */
|
|
50
|
-
})
|
|
18
|
+
o(e(s), {
|
|
19
|
+
value: e(r).title,
|
|
20
|
+
"onUpdate:value": t[0] || (t[0] = (n) => e(r).title = n)
|
|
21
|
+
}, null, 8, ["value"])
|
|
22
|
+
]),
|
|
23
|
+
_: 1
|
|
24
|
+
/* STABLE */
|
|
25
|
+
}),
|
|
26
|
+
o(e(a), { label: "是否必填" }, {
|
|
27
|
+
extra: l(() => [
|
|
28
|
+
o(x, { name: "sound" }),
|
|
29
|
+
t[2] || (t[2] = m(" 表单字段设置为必填才能作为审批条件 "))
|
|
30
|
+
]),
|
|
31
|
+
default: l(() => [
|
|
32
|
+
o(e(c), {
|
|
33
|
+
checked: e(r).required,
|
|
34
|
+
"onUpdate:checked": t[1] || (t[1] = (n) => e(r).required = n)
|
|
35
|
+
}, null, 8, ["checked"])
|
|
51
36
|
]),
|
|
52
37
|
_: 1
|
|
53
38
|
/* STABLE */
|
|
@@ -59,5 +44,5 @@ const V = /* @__PURE__ */ d({
|
|
|
59
44
|
}
|
|
60
45
|
});
|
|
61
46
|
export {
|
|
62
|
-
|
|
47
|
+
I as default
|
|
63
48
|
};
|