@king-one/form-design 0.0.26 → 0.0.27
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 +1 -1
- package/dist/es/src/components/panel/index.mjs +26 -24
- package/dist/es/src/components/panel/widget/leave-kit.vue.mjs +4 -0
- package/dist/es/src/components/panel/widget/leave-kit.vue2.mjs +66 -0
- package/dist/es/src/components/panel/widget/overtime-kit.vue.mjs +4 -0
- package/dist/es/src/components/panel/widget/overtime-kit.vue2.mjs +66 -0
- package/dist/es/src/components/props/widget/GridProps.vue2.mjs +80 -83
- package/dist/es/src/config/index.mjs +149 -124
- package/dist/es/src/core/FormSchema.mjs +45 -40
- package/dist/lib/src/components/form-material.vue.js +1 -1
- package/dist/lib/src/components/panel/index.js +1 -1
- package/dist/lib/src/components/panel/widget/leave-kit.vue.js +1 -0
- package/dist/lib/src/components/panel/widget/leave-kit.vue2.js +1 -0
- package/dist/lib/src/components/panel/widget/overtime-kit.vue.js +1 -0
- package/dist/lib/src/components/panel/widget/overtime-kit.vue2.js +1 -0
- package/dist/lib/src/components/props/widget/GridProps.vue2.js +1 -1
- package/dist/lib/src/config/index.js +15 -1
- package/dist/lib/src/core/FormSchema.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/kit-panel.css +1 -1
- package/dist/types/src/components/panel/widget/leave-kit.vue.d.ts +3 -0
- package/dist/types/src/components/panel/widget/overtime-kit.vue.d.ts +3 -0
- package/dist/types/src/core/Design.d.ts +211 -79
- package/dist/types/src/core/FormSchema.d.ts +77 -13
- package/dist/types/src/types.d.ts +23 -7
- package/package.json +1 -1
- package/dist/es/src/components/panel/widget/kit.vue.mjs +0 -4
- package/dist/es/src/components/panel/widget/kit.vue2.mjs +0 -48
- package/dist/lib/src/components/panel/widget/kit.vue.js +0 -1
- package/dist/lib/src/components/panel/widget/kit.vue2.js +0 -1
- package/dist/types/src/components/panel/widget/kit.vue.d.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { Input as
|
|
1
|
+
import { Input as m, Textarea as t, InputNumber as o } from "ant-design-vue";
|
|
2
2
|
import "./widget/object.vue.mjs";
|
|
3
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
6
|
import "./widget/date-range.vue.mjs";
|
|
7
7
|
import "./widget/date-single.vue.mjs";
|
|
8
|
-
import "./widget/kit.vue.mjs";
|
|
8
|
+
import "./widget/overtime-kit.vue.mjs";
|
|
9
9
|
import "./widget/array-table.vue.mjs";
|
|
10
10
|
import "./widget/grid.vue.mjs";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"k-input
|
|
23
|
-
"k-
|
|
24
|
-
"k-
|
|
25
|
-
"k-
|
|
26
|
-
"k-
|
|
27
|
-
"k-
|
|
28
|
-
"k-
|
|
29
|
-
"k-
|
|
30
|
-
"k-
|
|
31
|
-
"k-
|
|
11
|
+
import "./widget/leave-kit.vue.mjs";
|
|
12
|
+
import i from "./widget/select.vue2.mjs";
|
|
13
|
+
import p from "./widget/object.vue2.mjs";
|
|
14
|
+
import e from "./widget/date-range.vue2.mjs";
|
|
15
|
+
import a from "./widget/date-single.vue2.mjs";
|
|
16
|
+
import n from "./widget/array-card.vue2.mjs";
|
|
17
|
+
import f from "./widget/overtime-kit.vue2.mjs";
|
|
18
|
+
import _ from "./widget/leave-kit.vue2.mjs";
|
|
19
|
+
import c from "./widget/array-table.vue2.mjs";
|
|
20
|
+
import s from "./widget/grid.vue2.mjs";
|
|
21
|
+
const k = r(m), u = r(t), $ = r(o), C = {
|
|
22
|
+
"k-input": k,
|
|
23
|
+
"k-textarea": u,
|
|
24
|
+
"k-input-number": $,
|
|
25
|
+
"k-select": i,
|
|
26
|
+
"k-object": p,
|
|
27
|
+
"k-date-range": e,
|
|
28
|
+
"k-date-single": a,
|
|
29
|
+
"k-array-card": n,
|
|
30
|
+
"k-overtime": f,
|
|
31
|
+
"k-liveTime": _,
|
|
32
|
+
"k-table": c,
|
|
33
|
+
"k-grid": s
|
|
32
34
|
};
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
C as widgetPanels
|
|
35
37
|
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as c, createElementBlock as m, normalizeClass as d, unref as e, createElementVNode as l, createVNode as t, withCtx as s } from "vue";
|
|
2
|
+
import "../../../internal.mjs";
|
|
3
|
+
import { FormItem as a, RangePicker as p, InputNumber as o } from "ant-design-vue";
|
|
4
|
+
import { useNamespace as _ } from "../../../hooks/use-namespace/index.mjs";
|
|
5
|
+
const u = { class: "details" }, f = { class: "detail-content" }, x = /* @__PURE__ */ r({
|
|
6
|
+
__name: "leave-kit",
|
|
7
|
+
setup(k) {
|
|
8
|
+
const { b: n } = _("kit-panel");
|
|
9
|
+
return (b, i) => (c(), m(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
class: d(e(n)())
|
|
13
|
+
},
|
|
14
|
+
[
|
|
15
|
+
l("div", u, [
|
|
16
|
+
i[0] || (i[0] = l(
|
|
17
|
+
"div",
|
|
18
|
+
{ class: "detail-title" },
|
|
19
|
+
[
|
|
20
|
+
l("span", null, "请假明细")
|
|
21
|
+
],
|
|
22
|
+
-1
|
|
23
|
+
/* CACHED */
|
|
24
|
+
)),
|
|
25
|
+
l("div", f, [
|
|
26
|
+
t(e(a), {
|
|
27
|
+
label: "请假时长",
|
|
28
|
+
class: "kit-item"
|
|
29
|
+
}, {
|
|
30
|
+
default: s(() => [
|
|
31
|
+
t(e(p), { placeholder: ["开始日期", "结束日期"] })
|
|
32
|
+
]),
|
|
33
|
+
_: 1
|
|
34
|
+
/* STABLE */
|
|
35
|
+
}),
|
|
36
|
+
t(e(a), {
|
|
37
|
+
label: "请假时长",
|
|
38
|
+
class: "kit-item"
|
|
39
|
+
}, {
|
|
40
|
+
default: s(() => [
|
|
41
|
+
t(e(o), { style: { width: "100%" } })
|
|
42
|
+
]),
|
|
43
|
+
_: 1
|
|
44
|
+
/* STABLE */
|
|
45
|
+
})
|
|
46
|
+
])
|
|
47
|
+
]),
|
|
48
|
+
t(e(a), {
|
|
49
|
+
label: "总时长",
|
|
50
|
+
class: "kit-item"
|
|
51
|
+
}, {
|
|
52
|
+
default: s(() => [
|
|
53
|
+
t(e(o), { style: { width: "100%" } })
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
/* STABLE */
|
|
57
|
+
})
|
|
58
|
+
],
|
|
59
|
+
2
|
|
60
|
+
/* CLASS */
|
|
61
|
+
));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
x as default
|
|
66
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as m, createElementBlock as c, normalizeClass as d, unref as e, createElementVNode as l, createVNode as t, withCtx as s } from "vue";
|
|
2
|
+
import "../../../internal.mjs";
|
|
3
|
+
import { FormItem as a, RangePicker as p, InputNumber as o } from "ant-design-vue";
|
|
4
|
+
import { useNamespace as _ } from "../../../hooks/use-namespace/index.mjs";
|
|
5
|
+
const u = { class: "details" }, f = { class: "detail-content" }, x = /* @__PURE__ */ r({
|
|
6
|
+
__name: "overtime-kit",
|
|
7
|
+
setup(k) {
|
|
8
|
+
const { b: n } = _("kit-panel");
|
|
9
|
+
return (b, i) => (m(), c(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
class: d(e(n)())
|
|
13
|
+
},
|
|
14
|
+
[
|
|
15
|
+
l("div", u, [
|
|
16
|
+
i[0] || (i[0] = l(
|
|
17
|
+
"div",
|
|
18
|
+
{ class: "detail-title" },
|
|
19
|
+
[
|
|
20
|
+
l("span", null, "加班明细")
|
|
21
|
+
],
|
|
22
|
+
-1
|
|
23
|
+
/* CACHED */
|
|
24
|
+
)),
|
|
25
|
+
l("div", f, [
|
|
26
|
+
t(e(a), {
|
|
27
|
+
label: "加班日期",
|
|
28
|
+
class: "kit-item"
|
|
29
|
+
}, {
|
|
30
|
+
default: s(() => [
|
|
31
|
+
t(e(p), { placeholder: ["开始日期", "结束日期"] })
|
|
32
|
+
]),
|
|
33
|
+
_: 1
|
|
34
|
+
/* STABLE */
|
|
35
|
+
}),
|
|
36
|
+
t(e(a), {
|
|
37
|
+
label: "加班时长",
|
|
38
|
+
class: "kit-item"
|
|
39
|
+
}, {
|
|
40
|
+
default: s(() => [
|
|
41
|
+
t(e(o), { style: { width: "100%" } })
|
|
42
|
+
]),
|
|
43
|
+
_: 1
|
|
44
|
+
/* STABLE */
|
|
45
|
+
})
|
|
46
|
+
])
|
|
47
|
+
]),
|
|
48
|
+
t(e(a), {
|
|
49
|
+
label: "总时长",
|
|
50
|
+
class: "kit-item"
|
|
51
|
+
}, {
|
|
52
|
+
default: s(() => [
|
|
53
|
+
t(e(o), { style: { width: "100%" } })
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
/* STABLE */
|
|
57
|
+
})
|
|
58
|
+
],
|
|
59
|
+
2
|
|
60
|
+
/* CLASS */
|
|
61
|
+
));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
x as default
|
|
66
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as _, computed as k,
|
|
2
|
-
import { Form as
|
|
1
|
+
import { defineComponent as _, computed as k, openBlock as p, createBlock as y, unref as t, normalizeClass as g, withCtx as m, createVNode as n, createElementBlock as u, Fragment as h, renderList as C, createTextVNode as b } from "vue";
|
|
2
|
+
import { Form as B, FormItem as c, InputNumber as d, Button as F } from "ant-design-vue";
|
|
3
3
|
import "../../../internal.mjs";
|
|
4
|
-
import { uid as
|
|
4
|
+
import { uid as N } from "@king-one/utils";
|
|
5
5
|
import "../../form-icon.vue.mjs";
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
import { useInjectDesignContext as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
6
|
+
import { useNamespace as w } from "../../../hooks/use-namespace/index.mjs";
|
|
7
|
+
import { useInjectDesignContext as I } from "../../../context/design.mjs";
|
|
8
|
+
import U from "../../form-icon.vue2.mjs";
|
|
9
|
+
const T = /* @__PURE__ */ _({
|
|
10
10
|
__name: "GridProps",
|
|
11
|
-
setup(
|
|
12
|
-
const { b: f } =
|
|
11
|
+
setup(V) {
|
|
12
|
+
const { b: f } = w("grid-props"), { checkedField: r } = I(), s = k(() => r.value["x-component-props"] || {});
|
|
13
13
|
function v(l) {
|
|
14
14
|
var e;
|
|
15
15
|
(e = r.value.children) == null || e.splice(l, 1);
|
|
16
16
|
}
|
|
17
17
|
function x() {
|
|
18
|
-
var
|
|
19
|
-
const l =
|
|
20
|
-
title:
|
|
18
|
+
var a, i;
|
|
19
|
+
const l = N(), o = {
|
|
20
|
+
title: `栅格容器${(((a = r.value.children) == null ? void 0 : a.length) || 0) + 1}`,
|
|
21
21
|
name: l,
|
|
22
22
|
id: l,
|
|
23
23
|
key: "k-grid-column",
|
|
@@ -30,79 +30,76 @@ const q = /* @__PURE__ */ _({
|
|
|
30
30
|
span: 12
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
(i = r.value.children) == null || i.push(
|
|
33
|
+
(i = r.value.children) == null || i.push(o);
|
|
34
34
|
}
|
|
35
|
-
return (l, e) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/* STABLE */
|
|
102
|
-
}, 8, ["class"]);
|
|
103
|
-
};
|
|
35
|
+
return (l, e) => (p(), y(t(B), {
|
|
36
|
+
layout: "vertical",
|
|
37
|
+
class: g(t(f)())
|
|
38
|
+
}, {
|
|
39
|
+
default: m(() => [
|
|
40
|
+
n(t(c), { label: "间隔大小" }, {
|
|
41
|
+
default: m(() => [
|
|
42
|
+
n(t(d), {
|
|
43
|
+
value: s.value.gutter,
|
|
44
|
+
"onUpdate:value": e[0] || (e[0] = (o) => s.value.gutter = o),
|
|
45
|
+
style: { width: "100%" },
|
|
46
|
+
min: 1,
|
|
47
|
+
precision: 0,
|
|
48
|
+
max: 999,
|
|
49
|
+
"addon-after": "px"
|
|
50
|
+
}, null, 8, ["value"])
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
/* STABLE */
|
|
54
|
+
}),
|
|
55
|
+
n(t(c), { label: "配置项" }, {
|
|
56
|
+
default: m(() => [
|
|
57
|
+
(p(!0), u(
|
|
58
|
+
h,
|
|
59
|
+
null,
|
|
60
|
+
C(t(r).children, (o, a) => (p(), u("div", {
|
|
61
|
+
key: o.id,
|
|
62
|
+
class: "col-item"
|
|
63
|
+
}, [
|
|
64
|
+
n(t(d), {
|
|
65
|
+
value: o["x-component-props"].span,
|
|
66
|
+
"onUpdate:value": (i) => o["x-component-props"].span = i,
|
|
67
|
+
min: 1,
|
|
68
|
+
style: { width: "200px" },
|
|
69
|
+
precision: 0,
|
|
70
|
+
max: 24
|
|
71
|
+
}, null, 8, ["value", "onUpdate:value"]),
|
|
72
|
+
n(U, {
|
|
73
|
+
name: "delete1",
|
|
74
|
+
class: "close-icon",
|
|
75
|
+
onClick: (i) => v(a)
|
|
76
|
+
}, null, 8, ["onClick"])
|
|
77
|
+
]))),
|
|
78
|
+
128
|
|
79
|
+
/* KEYED_FRAGMENT */
|
|
80
|
+
)),
|
|
81
|
+
n(t(F), {
|
|
82
|
+
size: "small",
|
|
83
|
+
type: "primary",
|
|
84
|
+
style: { "margin-bottom": "10px" },
|
|
85
|
+
onClick: x
|
|
86
|
+
}, {
|
|
87
|
+
default: m(() => e[1] || (e[1] = [
|
|
88
|
+
b(" 添加 + ")
|
|
89
|
+
])),
|
|
90
|
+
_: 1,
|
|
91
|
+
__: [1]
|
|
92
|
+
})
|
|
93
|
+
]),
|
|
94
|
+
_: 1
|
|
95
|
+
/* STABLE */
|
|
96
|
+
})
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
/* STABLE */
|
|
100
|
+
}, 8, ["class"]));
|
|
104
101
|
}
|
|
105
102
|
});
|
|
106
103
|
export {
|
|
107
|
-
|
|
104
|
+
T as default
|
|
108
105
|
};
|