@kp-ui/lowcode 2.14.0-beta.5 → 2.14.0-beta.8
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/package.json +1 -1
- package/src/components/FormRender/useFormRender.js +17 -0
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +12 -12
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +18 -20
- package/src/components/form-designer/form-widget/container-widget/vf-box-item.vue.js +9 -9
- package/src/components/form-designer/form-widget/field-widget/cascader-widget.vue.js +32 -39
- package/src/components/form-designer/form-widget/field-widget/date-range-widget.vue.js +24 -31
- package/src/components/form-designer/form-widget/field-widget/date-widget.vue.js +26 -33
- package/src/components/form-designer/form-widget/field-widget/fieldMixin.js +4 -1
- package/src/components/form-designer/form-widget/field-widget/input-widget.vue.js +31 -38
- package/src/components/form-designer/form-widget/field-widget/number-widget.vue.js +23 -30
- package/src/components/form-designer/form-widget/field-widget/select-widget.vue.js +56 -63
- package/src/components/form-designer/form-widget/field-widget/switch-widget.vue.js +1 -1
- package/src/components/form-designer/form-widget/field-widget/textarea-widget.vue.js +23 -32
- package/src/components/form-designer/form-widget/field-widget/treeSelect-widget.vue.js +26 -33
- package/src/components/form-designer/setting-panel/form-setting.vue.js +2 -2
- package/src/components/form-designer/setting-panel/form-setting.vue2.js +81 -94
- package/src/components/form-designer/setting-panel/index.vue.js +2 -2
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +7 -7
- package/src/components/form-render/RenderWigetList.vue.js +61 -0
- package/src/components/form-render/RenderWigetList.vue2.js +4 -0
- package/src/components/form-render/SubmitButtonRender.vue.js +33 -29
- package/src/components/form-render/container-item/container-item-wrapper.vue.js +2 -23
- package/src/components/form-render/container-item/container-item-wrapper.vue2.js +20 -0
- package/src/components/form-render/container-item/data-table-item.vue.js +22 -36
- package/src/components/form-render/container-item/grid-item.vue.js +7 -7
- package/src/components/form-render/container-item/grid-sub-form-item.vue.js +1 -1
- package/src/components/form-render/container-item/sub-form-item.vue.js +1 -1
- package/src/components/form-render/container-item/tab-item.vue.js +19 -19
- package/src/components/form-render/container-item/table-item.vue.js +7 -7
- package/src/components/form-render/container-item/vf-collapse-item.vue.js +27 -27
- package/src/components/form-render/dynamic-dialog.vue.js +70 -85
- package/src/components/form-render/index.vue.js +79 -98
- package/src/hooks/useLowcode.js +40 -39
- package/src/lang/en-US.js +3 -0
- package/src/lang/zh-CN.js +3 -0
- package/src/mixins/useDataTableMixin.js +18 -23
- package/stats.html +1 -1
- package/styles/style.css +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ContainerWidgetMap as t } from "../form-render/container-item/index.js";
|
|
2
|
+
function a() {
|
|
3
|
+
function o(e) {
|
|
4
|
+
var r;
|
|
5
|
+
if (!e) return "";
|
|
6
|
+
const n = `./${e.type}-item.vue`;
|
|
7
|
+
return t[n] || console.warn(`未找到容器组件类型: ${e.type},请确保已注册该组件。`), (r = t[n]) == null ? void 0 : r.default;
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
getFieldWidget: (e) => e ? (console.log({ widget: e.type }), `${e.type}-widget`) : "",
|
|
11
|
+
getContainerWidget: o,
|
|
12
|
+
ContainerWidgetMap: t
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
a as useFormRender
|
|
17
|
+
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import u from "./data-table-widget.vue2.js";
|
|
2
|
-
import { resolveComponent as a, createBlock as s, openBlock as
|
|
2
|
+
import { resolveComponent as a, createBlock as s, openBlock as n, withCtx as l, createElementBlock as C, withModifiers as p, normalizeClass as r, createElementVNode as y, createVNode as m, normalizeStyle as b, createCommentVNode as f } from "vue";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import R from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const z = { class: "talbe-wrapper" };
|
|
6
|
-
function S(e,
|
|
6
|
+
function S(e, i, t, N, k, d) {
|
|
7
7
|
const c = a("a-empty"), w = a("RenderBodyCell"), g = a("s-table"), h = a("container-wrapper");
|
|
8
|
-
return
|
|
8
|
+
return n(), s(h, {
|
|
9
9
|
designer: t.designer,
|
|
10
10
|
widget: t.widget,
|
|
11
11
|
"parent-widget": t.parentWidget,
|
|
12
12
|
"parent-list": t.parentList,
|
|
13
13
|
"index-of-parent-list": t.indexOfParentList
|
|
14
14
|
}, {
|
|
15
|
-
default:
|
|
16
|
-
(
|
|
15
|
+
default: l(() => [
|
|
16
|
+
(n(), C("div", {
|
|
17
17
|
key: t.widget.id,
|
|
18
|
-
class: r(["collapse-container data-table-container", { selected:
|
|
19
|
-
onClick:
|
|
18
|
+
class: r(["collapse-container data-table-container", { selected: d.selected }]),
|
|
19
|
+
onClick: i[0] || (i[0] = p((o) => e.selectWidget(t.widget), ["stop"]))
|
|
20
20
|
}, [
|
|
21
21
|
y("div", z, [
|
|
22
22
|
m(g, {
|
|
@@ -24,7 +24,7 @@ function S(e, d, t, N, _, n) {
|
|
|
24
24
|
columns: e.columns.columns,
|
|
25
25
|
scroll: { y: e.tableHeight },
|
|
26
26
|
height: e.tableHeight,
|
|
27
|
-
dataSource:
|
|
27
|
+
dataSource: d.data,
|
|
28
28
|
class: r([e.customClass]),
|
|
29
29
|
size: e.widgetSize,
|
|
30
30
|
rowKey: (o) => o[t.widget.options.rowKey],
|
|
@@ -41,11 +41,11 @@ function S(e, d, t, N, _, n) {
|
|
|
41
41
|
loading: e.loading,
|
|
42
42
|
"row-height": e.lineHeight
|
|
43
43
|
}, {
|
|
44
|
-
emptyText:
|
|
44
|
+
emptyText: l(() => [
|
|
45
45
|
m(c)
|
|
46
46
|
]),
|
|
47
|
-
bodyCell:
|
|
48
|
-
e.isShowBodyCell(o.column.dataIndex) ? (
|
|
47
|
+
bodyCell: l((o) => [
|
|
48
|
+
e.isShowBodyCell(o.column.dataIndex) ? (n(), s(w, {
|
|
49
49
|
key: 0,
|
|
50
50
|
bodyCell: e.columns.bodyCell,
|
|
51
51
|
scope: o
|
|
@@ -59,7 +59,7 @@ function S(e, d, t, N, _, n) {
|
|
|
59
59
|
_: 1
|
|
60
60
|
}, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"]);
|
|
61
61
|
}
|
|
62
|
-
const W = /* @__PURE__ */ R(u, [["render", S], ["__scopeId", "data-v-
|
|
62
|
+
const W = /* @__PURE__ */ R(u, [["render", S], ["__scopeId", "data-v-1355f36c"]]);
|
|
63
63
|
export {
|
|
64
64
|
W as default
|
|
65
65
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import e from "./container-wrapper.vue.js";
|
|
2
|
+
import t from "../../../../utils/emitter.js";
|
|
3
|
+
import i from "../../../../utils/i18n.js";
|
|
4
|
+
import r from "../field-widget/index.js";
|
|
5
|
+
import o from "./containerMixin.js";
|
|
6
|
+
import a from "../../refMixinDesign.js";
|
|
7
|
+
import n from "../../../../mixins/useDataTableMixin.js";
|
|
8
|
+
const c = {
|
|
9
9
|
name: "DataTableWidget",
|
|
10
10
|
componentName: "DataTableWidget",
|
|
11
|
-
mixins: [
|
|
11
|
+
mixins: [i, o, a, t, n],
|
|
12
12
|
inject: ["refList"],
|
|
13
13
|
components: {
|
|
14
|
-
ContainerWrapper:
|
|
15
|
-
...
|
|
14
|
+
ContainerWrapper: e,
|
|
15
|
+
...r
|
|
16
16
|
},
|
|
17
17
|
data() {
|
|
18
18
|
return {
|
|
@@ -45,9 +45,11 @@ const l = {
|
|
|
45
45
|
this.initRefList();
|
|
46
46
|
},
|
|
47
47
|
mounted() {
|
|
48
|
-
this.
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
this.setPagination({
|
|
49
|
+
pageSize: this.widget.options.pagination.pageSize,
|
|
50
|
+
page: 1,
|
|
51
|
+
total: 1
|
|
52
|
+
});
|
|
51
53
|
},
|
|
52
54
|
computed: {
|
|
53
55
|
data() {
|
|
@@ -57,12 +59,8 @@ const l = {
|
|
|
57
59
|
return this.widget.id === this.designer.selectedId;
|
|
58
60
|
}
|
|
59
61
|
},
|
|
60
|
-
methods: {
|
|
61
|
-
selectWidget(e) {
|
|
62
|
-
this.designer.setSelected(e);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
62
|
+
methods: {}
|
|
65
63
|
};
|
|
66
64
|
export {
|
|
67
|
-
|
|
65
|
+
c as default
|
|
68
66
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import F from "../../../form-render/container-item/container-item-wrapper.
|
|
1
|
+
import F from "../../../form-render/container-item/container-item-wrapper.vue2.js";
|
|
2
2
|
import R from "../../../../utils/emitter.js";
|
|
3
|
-
import { defineAsyncComponent as O, resolveComponent as c, withDirectives as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { defineAsyncComponent as O, resolveComponent as c, withDirectives as _, createBlock as a, openBlock as n, withCtx as m, createElementBlock as f, normalizeStyle as L, normalizeClass as S, createCommentVNode as g, Fragment as p, renderList as u, resolveDynamicComponent as w, createSlots as b, renderSlot as h, mergeProps as x, vShow as k } from "vue";
|
|
4
|
+
import $ from "../../../../utils/i18n.js";
|
|
5
|
+
import j from "../field-widget/index.js";
|
|
6
6
|
import B from "../../../form-render/refMixin.js";
|
|
7
7
|
import I from "../../../form-render/container-item/containerItemMixin.js";
|
|
8
8
|
import M from "../../../svg-icon/index.vue.js";
|
|
@@ -12,11 +12,11 @@ const D = {
|
|
|
12
12
|
name: "VfBoxItem",
|
|
13
13
|
componentName: "boxItem",
|
|
14
14
|
// 必须固定为ContainerItem,用于接收父级组件的broadcast事件
|
|
15
|
-
mixins: [R,
|
|
15
|
+
mixins: [R, $, B, I],
|
|
16
16
|
components: {
|
|
17
17
|
ContainerItemWrapper: F,
|
|
18
18
|
SvgIcon: M,
|
|
19
|
-
|
|
19
|
+
...j,
|
|
20
20
|
VFormRender: O(() => import("../../../form-render/index.vue.js"))
|
|
21
21
|
},
|
|
22
22
|
props: {
|
|
@@ -118,11 +118,11 @@ const D = {
|
|
|
118
118
|
};
|
|
119
119
|
function N(e, o, t, T, V, l) {
|
|
120
120
|
const y = c("VFormRender"), C = c("container-item-wrapper");
|
|
121
|
-
return
|
|
121
|
+
return _((n(), a(C, { widget: t.widget }, {
|
|
122
122
|
default: m(() => [
|
|
123
123
|
(n(), f("div", {
|
|
124
|
-
class:
|
|
125
|
-
style:
|
|
124
|
+
class: S(["box-container-item", [l.customClass]]),
|
|
125
|
+
style: L(l.boxStyle),
|
|
126
126
|
key: t.widget.id
|
|
127
127
|
}, [
|
|
128
128
|
t.widget.options.formCode ? (n(), a(y, {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { formateCascaderCode as
|
|
5
|
-
import
|
|
6
|
-
import { resolveComponent as o, createBlock as
|
|
1
|
+
import u from "./form-item-wrapper.vue.js";
|
|
2
|
+
import f from "../../../../utils/emitter.js";
|
|
3
|
+
import c from "../../../../utils/i18n.js";
|
|
4
|
+
import { formateCascaderCode as h } from "../../../../utils/format.js";
|
|
5
|
+
import p from "./fieldMixin.js";
|
|
6
|
+
import { resolveComponent as o, createBlock as b, createCommentVNode as d, openBlock as r, withCtx as g, createElementVNode as y, normalizeClass as C, createVNode as w, createElementBlock as v, toDisplayString as F } from "vue";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
8
|
+
import K from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
9
|
const M = {
|
|
10
10
|
name: "cascader-widget",
|
|
11
11
|
componentName: "FieldWidget",
|
|
12
12
|
//必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
13
|
-
mixins: [
|
|
13
|
+
mixins: [f, p, c],
|
|
14
14
|
props: {
|
|
15
15
|
field: Object,
|
|
16
16
|
parentWidget: Object,
|
|
@@ -38,7 +38,7 @@ const M = {
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
components: {
|
|
41
|
-
FormItemWrapper:
|
|
41
|
+
FormItemWrapper: u
|
|
42
42
|
},
|
|
43
43
|
data() {
|
|
44
44
|
return {
|
|
@@ -65,7 +65,7 @@ const M = {
|
|
|
65
65
|
// return this.field.options.showAllLevels === undefined || !!this.field.options.showAllLevels;
|
|
66
66
|
// },
|
|
67
67
|
contentForReadMode() {
|
|
68
|
-
return this.fieldModel ?
|
|
68
|
+
return this.fieldModel ? h(this.field.options.optionItems, this.fieldModel, {
|
|
69
69
|
label: this.labelKey,
|
|
70
70
|
value: this.valueKey,
|
|
71
71
|
children: this.childrenKey
|
|
@@ -88,10 +88,13 @@ const M = {
|
|
|
88
88
|
hideDropDownOnClick() {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
}, x = {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
}, x = {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: "readonly-mode-field"
|
|
94
|
+
};
|
|
95
|
+
function I(i, n, e, R, l, t) {
|
|
96
|
+
const s = o("a-cascader"), a = o("form-item-wrapper");
|
|
97
|
+
return i.handleHidden() ? d("", !0) : (r(), b(a, {
|
|
95
98
|
key: 0,
|
|
96
99
|
designer: e.designer,
|
|
97
100
|
field: e.field,
|
|
@@ -104,43 +107,33 @@ function I(t, n, e, K, l, i) {
|
|
|
104
107
|
"sub-form-col-index": e.subFormColIndex,
|
|
105
108
|
"sub-form-row-id": e.subFormRowId
|
|
106
109
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
|
|
109
|
-
class:
|
|
110
|
+
default: g(() => [
|
|
111
|
+
y("div", {
|
|
112
|
+
class: C(["full-width-input", { "readonly-mode-cascader": i.isReadMode }])
|
|
110
113
|
}, [
|
|
111
|
-
w(
|
|
114
|
+
w(s, {
|
|
112
115
|
ref: "fieldEditor",
|
|
113
|
-
size:
|
|
116
|
+
size: t.size,
|
|
114
117
|
options: e.field.options.optionItems,
|
|
115
118
|
value: l.fieldModel,
|
|
116
|
-
"onUpdate:value": n[0] || (n[0] = (
|
|
117
|
-
disabled:
|
|
119
|
+
"onUpdate:value": n[0] || (n[0] = (m) => l.fieldModel = m),
|
|
120
|
+
disabled: i.handleDisabled(),
|
|
118
121
|
allowClear: e.field.options.allowClear,
|
|
119
|
-
placeholder: e.field.options.placeholder ||
|
|
120
|
-
fieldNames: { value:
|
|
122
|
+
placeholder: e.field.options.placeholder || i.i18nt("render.hint.selectPlaceholder"),
|
|
123
|
+
fieldNames: { value: t.valueKey, label: t.labelKey, children: t.childrenKey },
|
|
121
124
|
expandTrigger: "hover",
|
|
122
125
|
multiple: e.field.options.multiple,
|
|
123
|
-
onFocus:
|
|
124
|
-
onBlur:
|
|
125
|
-
onChange:
|
|
126
|
+
onFocus: i.handleFocusCustomEvent,
|
|
127
|
+
onBlur: i.handleBlurCustomEvent,
|
|
128
|
+
onChange: i.handleChangeEvent
|
|
126
129
|
}, null, 8, ["size", "options", "value", "disabled", "allowClear", "placeholder", "fieldNames", "multiple", "onFocus", "onBlur", "onChange"]),
|
|
127
|
-
|
|
128
|
-
key: 0,
|
|
129
|
-
placement: "topLeft",
|
|
130
|
-
title: i.contentForReadMode,
|
|
131
|
-
overlayStyle: { zIndex: 1e3 }
|
|
132
|
-
}, {
|
|
133
|
-
default: a(() => [
|
|
134
|
-
m("span", x, F(i.contentForReadMode), 1)
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
}, 8, ["title"])) : r("", !0)
|
|
130
|
+
i.isReadMode ? (r(), v("span", x, F(t.contentForReadMode), 1)) : d("", !0)
|
|
138
131
|
], 2)
|
|
139
132
|
]),
|
|
140
133
|
_: 1
|
|
141
134
|
}, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]));
|
|
142
135
|
}
|
|
143
|
-
const
|
|
136
|
+
const W = /* @__PURE__ */ K(M, [["render", I], ["__scopeId", "data-v-bb8b3209"]]);
|
|
144
137
|
export {
|
|
145
|
-
|
|
138
|
+
W as default
|
|
146
139
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { resolveComponent as
|
|
1
|
+
import u from "./form-item-wrapper.vue.js";
|
|
2
|
+
import h from "../../../../utils/emitter.js";
|
|
3
|
+
import c from "../../../../utils/i18n.js";
|
|
4
|
+
import g from "./fieldMixin.js";
|
|
5
|
+
import { resolveComponent as n, createBlock as b, createCommentVNode as l, openBlock as i, withCtx as p, createElementVNode as w, normalizeClass as r, createVNode as F, createElementBlock as C, toDisplayString as v } from "vue";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import
|
|
7
|
+
import y from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
8
|
const M = {
|
|
9
9
|
name: "date-range-widget",
|
|
10
10
|
componentName: "FieldWidget",
|
|
11
11
|
//必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
12
|
-
mixins: [
|
|
12
|
+
mixins: [h, g, c],
|
|
13
13
|
props: {
|
|
14
14
|
field: Object,
|
|
15
15
|
parentWidget: Object,
|
|
@@ -37,7 +37,7 @@ const M = {
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
components: {
|
|
40
|
-
FormItemWrapper:
|
|
40
|
+
FormItemWrapper: u
|
|
41
41
|
},
|
|
42
42
|
data() {
|
|
43
43
|
return {
|
|
@@ -64,10 +64,13 @@ const M = {
|
|
|
64
64
|
this.unregisterFromRefList();
|
|
65
65
|
},
|
|
66
66
|
methods: {}
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
}, R = {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: "readonly-mode-field"
|
|
70
|
+
};
|
|
71
|
+
function _(t, d, e, x, o, a) {
|
|
72
|
+
const s = n("a-range-picker"), m = n("form-item-wrapper");
|
|
73
|
+
return t.handleHidden() ? l("", !0) : (i(), b(m, {
|
|
71
74
|
key: 0,
|
|
72
75
|
designer: e.designer,
|
|
73
76
|
field: e.field,
|
|
@@ -80,18 +83,18 @@ function R(t, l, e, x, o, m) {
|
|
|
80
83
|
"sub-form-col-index": e.subFormColIndex,
|
|
81
84
|
"sub-form-row-id": e.subFormRowId
|
|
82
85
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
85
|
-
class:
|
|
86
|
+
default: p(() => [
|
|
87
|
+
w("div", {
|
|
88
|
+
class: r([
|
|
86
89
|
e.field.options.autoFullWidth ? "auto-full-width" : "",
|
|
87
90
|
t.isReadMode ? "readonly-mode-date-range" : ""
|
|
88
91
|
])
|
|
89
92
|
}, [
|
|
90
|
-
|
|
93
|
+
F(s, {
|
|
91
94
|
ref: "fieldEditor",
|
|
92
95
|
value: o.fieldModel,
|
|
93
|
-
"onUpdate:value":
|
|
94
|
-
class:
|
|
96
|
+
"onUpdate:value": d[0] || (d[0] = (f) => o.fieldModel = f),
|
|
97
|
+
class: r([e.field.options.autoFullWidth ? "auto-full-width" : ""]),
|
|
95
98
|
disabled: t.handleDisabled(),
|
|
96
99
|
readonly: e.field.options.readonly,
|
|
97
100
|
allowClear: e.field.options.allowClear,
|
|
@@ -104,23 +107,13 @@ function R(t, l, e, x, o, m) {
|
|
|
104
107
|
onBlur: t.handleBlurCustomEvent,
|
|
105
108
|
onChange: t.handleChangeEvent
|
|
106
109
|
}, null, 8, ["value", "class", "disabled", "readonly", "allowClear", "show-time", "format", "value-format", "start-placeholder", "end-placeholder", "onFocus", "onBlur", "onChange"]),
|
|
107
|
-
t.isReadMode ? (
|
|
108
|
-
key: 0,
|
|
109
|
-
placement: "topLeft",
|
|
110
|
-
title: o.fieldModel,
|
|
111
|
-
overlayStyle: { zIndex: 1e3 }
|
|
112
|
-
}, {
|
|
113
|
-
default: a(() => [
|
|
114
|
-
s("span", _, y(m.contentForReadMode), 1)
|
|
115
|
-
]),
|
|
116
|
-
_: 1
|
|
117
|
-
}, 8, ["title"])) : i("", !0)
|
|
110
|
+
t.isReadMode ? (i(), C("span", R, v(a.contentForReadMode), 1)) : l("", !0)
|
|
118
111
|
], 2)
|
|
119
112
|
]),
|
|
120
113
|
_: 1
|
|
121
114
|
}, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]));
|
|
122
115
|
}
|
|
123
|
-
const
|
|
116
|
+
const L = /* @__PURE__ */ y(M, [["render", _], ["__scopeId", "data-v-7f77f8d8"]]);
|
|
124
117
|
export {
|
|
125
|
-
|
|
118
|
+
L as default
|
|
126
119
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { resolveComponent as
|
|
1
|
+
import u from "./form-item-wrapper.vue.js";
|
|
2
|
+
import h from "../../../../utils/emitter.js";
|
|
3
|
+
import c from "../../../../utils/i18n.js";
|
|
4
|
+
import p from "./fieldMixin.js";
|
|
5
|
+
import { resolveComponent as d, createBlock as g, createCommentVNode as n, openBlock as l, withCtx as b, createElementVNode as w, normalizeClass as r, createVNode as C, createElementBlock as F, toDisplayString as y } from "vue";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import
|
|
8
|
-
const
|
|
7
|
+
import v from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
|
+
const _ = {
|
|
9
9
|
name: "date-widget",
|
|
10
10
|
componentName: "FieldWidget",
|
|
11
11
|
//必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
12
|
-
mixins: [
|
|
12
|
+
mixins: [h, p, c],
|
|
13
13
|
props: {
|
|
14
14
|
field: Object,
|
|
15
15
|
parentWidget: Object,
|
|
@@ -37,7 +37,7 @@ const v = {
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
components: {
|
|
40
|
-
FormItemWrapper:
|
|
40
|
+
FormItemWrapper: u
|
|
41
41
|
},
|
|
42
42
|
data() {
|
|
43
43
|
return {
|
|
@@ -64,10 +64,13 @@ const v = {
|
|
|
64
64
|
this.unregisterFromRefList();
|
|
65
65
|
},
|
|
66
66
|
methods: {}
|
|
67
|
-
}, x = {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
}, x = {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: "readonly-mode-field"
|
|
70
|
+
};
|
|
71
|
+
function k(t, o, e, z, i, a) {
|
|
72
|
+
const s = d("a-date-picker"), f = d("form-item-wrapper");
|
|
73
|
+
return t.handleHidden() ? n("", !0) : (l(), g(f, {
|
|
71
74
|
key: 0,
|
|
72
75
|
designer: e.designer,
|
|
73
76
|
field: e.field,
|
|
@@ -80,20 +83,20 @@ function z(t, d, e, M, i, m) {
|
|
|
80
83
|
"sub-form-col-index": e.subFormColIndex,
|
|
81
84
|
"sub-form-row-id": e.subFormRowId
|
|
82
85
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
85
|
-
class:
|
|
86
|
+
default: b(() => [
|
|
87
|
+
w("div", {
|
|
88
|
+
class: r([
|
|
86
89
|
e.field.options.autoFullWidth ? "auto-full-width" : "",
|
|
87
90
|
t.isReadMode ? "readonly-mode-date" : ""
|
|
88
91
|
])
|
|
89
92
|
}, [
|
|
90
|
-
|
|
91
|
-
size:
|
|
93
|
+
C(s, {
|
|
94
|
+
size: a.size,
|
|
92
95
|
ref: "fieldEditor",
|
|
93
96
|
picker: e.field.options.type,
|
|
94
97
|
value: i.fieldModel,
|
|
95
|
-
"onUpdate:value":
|
|
96
|
-
class:
|
|
98
|
+
"onUpdate:value": o[0] || (o[0] = (m) => i.fieldModel = m),
|
|
99
|
+
class: r([e.field.options.autoFullWidth ? "auto-full-width" : ""]),
|
|
97
100
|
readonly: e.field.options.readonly,
|
|
98
101
|
disabled: t.handleDisabled(),
|
|
99
102
|
allowClear: e.field.options.allowClear,
|
|
@@ -105,23 +108,13 @@ function z(t, d, e, M, i, m) {
|
|
|
105
108
|
onBlur: t.handleBlurCustomEvent,
|
|
106
109
|
onChange: t.handleChangeEvent
|
|
107
110
|
}, null, 8, ["size", "picker", "value", "class", "readonly", "disabled", "allowClear", "show-time", "format", "value-format", "placeholder", "onFocus", "onBlur", "onChange"]),
|
|
108
|
-
t.isReadMode ? (
|
|
109
|
-
key: 0,
|
|
110
|
-
placement: "topLeft",
|
|
111
|
-
title: i.fieldModel,
|
|
112
|
-
overlayStyle: { zIndex: 1e3 }
|
|
113
|
-
}, {
|
|
114
|
-
default: a(() => [
|
|
115
|
-
s("span", x, y(i.fieldModel), 1)
|
|
116
|
-
]),
|
|
117
|
-
_: 1
|
|
118
|
-
}, 8, ["title"])) : n("", !0)
|
|
111
|
+
t.isReadMode ? (l(), F("span", x, y(i.fieldModel), 1)) : n("", !0)
|
|
119
112
|
], 2)
|
|
120
113
|
]),
|
|
121
114
|
_: 1
|
|
122
115
|
}, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]));
|
|
123
116
|
}
|
|
124
|
-
const
|
|
117
|
+
const W = /* @__PURE__ */ v(_, [["render", k], ["__scopeId", "data-v-2926f4d0"]]);
|
|
125
118
|
export {
|
|
126
|
-
|
|
119
|
+
W as default
|
|
127
120
|
};
|
|
@@ -84,9 +84,12 @@ const g = {
|
|
|
84
84
|
getPropName() {
|
|
85
85
|
return this.subFormItemFlag && !this.designState ? this.subFormName + "." + this.subFormRowIndex + "." + this.field.options.name : this.field.options.name;
|
|
86
86
|
},
|
|
87
|
+
getEl() {
|
|
88
|
+
return this.$el;
|
|
89
|
+
},
|
|
87
90
|
initFieldModel() {
|
|
88
91
|
if (this.field.formItemFlag) {
|
|
89
|
-
if (
|
|
92
|
+
if (this.subFormItemFlag && !this.designState) {
|
|
90
93
|
const i = this.formModel[this.subFormName];
|
|
91
94
|
(i === void 0 || i[this.subFormRowIndex] === void 0 || i[this.subFormRowIndex][this.field.options.name] === void 0) && this.field.options.defaultValue !== void 0 ? (this.fieldModel = this.field.options.defaultValue, i[this.subFormRowIndex][this.field.options.name] = this.field.options.defaultValue) : i[this.subFormRowIndex][this.field.options.name] === void 0 ? (this.fieldModel = null, i[this.subFormRowIndex][this.field.options.name] = null) : this.fieldModel = i[this.subFormRowIndex][this.field.options.name], setTimeout(() => {
|
|
92
95
|
this.handleOnChangeForSubForm(
|