@kp-ui/lowcode 2.14.0-beta → 2.14.0-beta.2
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/install.js +26 -25
- package/package.json +2 -2
- package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +1 -1
- package/src/components/form-designer/index.vue.js +55 -54
- package/src/components/form-designer/setting-panel/form-crud-setting.vue.js +62 -23
- package/src/components/form-designer/setting-panel/index.vue.js +4 -386
- package/src/components/form-designer/setting-panel/index.vue2.js +273 -0
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/customRowEvent/data-table-customRow-editor.vue.js +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-pagination-editor.vue.js +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-selections-editor.vue2.js +24 -24
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +9 -8
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +7 -6
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/bodyStyle-editor.vue2.js +7 -6
- package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue.js +2 -40
- package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue2.js +41 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue2.js +44 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue2.js +43 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue.js +2 -46
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue2.js +43 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue2.js +44 -0
- package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue.js +2 -66
- package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue2.js +42 -0
- package/src/components/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/hidden-editor.vue.js +6 -5
- package/src/components/form-designer/setting-panel/property-editor/index.js +146 -152
- package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue.js +8 -7
- package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue.js +38 -35
- package/src/components/form-designer/setting-panel/propertyRegister.js +0 -12
- package/src/components/form-render/container-item/data-table-item.vue.js +149 -0
- package/src/components/form-render/container-item/grid-col-item.vue.js +149 -0
- package/src/components/form-render/container-item/grid-item.vue.js +92 -0
- package/src/components/form-render/container-item/grid-sub-form-item.vue.js +319 -0
- package/src/components/form-render/container-item/index.js +24 -0
- package/src/components/form-render/container-item/sub-form-item.vue.js +429 -0
- package/src/components/form-render/container-item/tab-item.vue.js +160 -0
- package/src/components/form-render/container-item/table-cell-item.vue.js +95 -0
- package/src/components/form-render/container-item/table-item.vue.js +96 -0
- package/src/components/form-render/container-item/vf-collapse-item.vue.js +252 -0
- package/src/components/form-render/container-item/vf-dialog-item.vue.js +12 -0
- package/src/components/form-render/container-item/vf-drawer-item.vue.js +12 -0
- package/src/components/form-render/index.vue.js +12 -14
- package/src/components/http-editor/index.vue.js +10 -10
- package/src/components/public/ActionButtonListRender.vue.js +19 -24
- package/src/lang/en-US.js +1 -3
- package/src/lang/zh-CN.js +0 -3
- package/src/utils/useEmitter.js +57 -0
- package/src/utils/util.js +50 -49
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/src/components/form-designer/setting-panel/property-editor/displayStyle-editor.vue.js +0 -46
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onVformAdd-editor.vue.js +0 -49
- package/src/components/form-designer/setting-panel/property-editor/multipleSelect-editor.vue.js +0 -30
- package/src/components/form-designer/setting-panel/property-editor/uploadTip-editor.vue.js +0 -31
- package/src/components/form-designer/setting-panel/property-editor/uploadURL-editor.vue.js +0 -44
- package/src/components/form-designer/setting-panel/property-editor/withCredentials-editor.vue.js +0 -30
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const e = {
|
|
2
|
-
//字段
|
|
3
2
|
name: "name-editor",
|
|
4
3
|
label: "label-editor",
|
|
5
4
|
labelAlign: "labelAlign-editor",
|
|
@@ -17,7 +16,6 @@ const e = {
|
|
|
17
16
|
autoFullWidth: "autoFullWidth-editor",
|
|
18
17
|
size: "size-editor",
|
|
19
18
|
flex: "flex-editor",
|
|
20
|
-
// displayStyle: 'displayStyle-editor',
|
|
21
19
|
buttonStyle: "buttonStyle-editor",
|
|
22
20
|
border: "border-editor",
|
|
23
21
|
labelWidth: "labelWidth-editor",
|
|
@@ -59,24 +57,14 @@ const e = {
|
|
|
59
57
|
diyCompontent: "diy-compontent-editor",
|
|
60
58
|
format: "format-editor",
|
|
61
59
|
valueFormat: "valueFormat-editor",
|
|
62
|
-
// filterable: 'filterable-editor',
|
|
63
|
-
// allowCreate: 'allowCreate-editor',
|
|
64
60
|
showSearch: "showSearch-editor",
|
|
65
|
-
// automaticDropdown: 'automaticDropdown-editor',
|
|
66
|
-
// checkStrictly: 'checkStrictly-editor',
|
|
67
|
-
// showAllLevels: 'showAllLevels-editor',
|
|
68
61
|
multiple: "multiple-editor",
|
|
69
62
|
accept: "accept-editor",
|
|
70
|
-
// multipleLimit: 'multipleLimit-editor',
|
|
71
63
|
mode: "mode-editor",
|
|
72
64
|
menuList: "menuList-editor",
|
|
73
65
|
contentPosition: "contentPosition-editor",
|
|
74
66
|
optionItems: "optionItems-editor",
|
|
75
67
|
treeData: "tree-data-editor",
|
|
76
|
-
// uploadURL: 'uploadURL-editor',
|
|
77
|
-
// uploadTip: 'uploadTip-editor',
|
|
78
|
-
// withCredentials: 'withCredentials-editor',
|
|
79
|
-
// multipleSelect: 'multipleSelect-editor',
|
|
80
68
|
limit: "limit-editor",
|
|
81
69
|
maxSize: "maxSize-editor",
|
|
82
70
|
fileTypes: "fileTypes-editor",
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import p from "./container-item-wrapper.vue.js";
|
|
2
|
+
import h from "../../../utils/emitter.js";
|
|
3
|
+
import g from "../../../utils/i18n.js";
|
|
4
|
+
import w from "../../form-designer/form-widget/field-widget/index.js";
|
|
5
|
+
import f from "../refMixin.js";
|
|
6
|
+
import b from "./containerItemMixin.js";
|
|
7
|
+
import C from "../../../mixins/useDataTableMixin.js";
|
|
8
|
+
import { resolveComponent as n, withDirectives as y, createBlock as a, openBlock as r, normalizeStyle as s, withCtx as i, createVNode as l, normalizeClass as R, createCommentVNode as F, vShow as S } from "vue";
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
import I from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
12
|
+
const T = {
|
|
13
|
+
name: "DataTableItem",
|
|
14
|
+
componentName: "ContainerItem",
|
|
15
|
+
// 必须固定为ContainerItem,用于接收父级组件的broadcast事件
|
|
16
|
+
mixins: [h, g, f, b, C],
|
|
17
|
+
components: {
|
|
18
|
+
ContainerItemWrapper: p,
|
|
19
|
+
...w
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
widget: Object,
|
|
23
|
+
parentWidget: Object,
|
|
24
|
+
parentList: Array,
|
|
25
|
+
indexOfParentList: Number,
|
|
26
|
+
data: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default: () => []
|
|
29
|
+
},
|
|
30
|
+
subFormRowIndex: {
|
|
31
|
+
/* 子表单组件行索引,从0开始计数 */
|
|
32
|
+
type: Number,
|
|
33
|
+
default: -1
|
|
34
|
+
},
|
|
35
|
+
subFormColIndex: {
|
|
36
|
+
/* 子表单组件列索引,从0开始计数 */
|
|
37
|
+
type: Number,
|
|
38
|
+
default: -1
|
|
39
|
+
},
|
|
40
|
+
subFormRowId: {
|
|
41
|
+
/* 子表单组件行Id,唯一id且不可变 */
|
|
42
|
+
type: String,
|
|
43
|
+
default: ""
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
inject: ["refList", "sfRefList", "globalModel", "getFormConfig", "getGlobalDsv"],
|
|
47
|
+
data() {
|
|
48
|
+
return {};
|
|
49
|
+
},
|
|
50
|
+
computed: {
|
|
51
|
+
formConfig() {
|
|
52
|
+
return this.getFormConfig();
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
created() {
|
|
56
|
+
this.initRefList(), this.handleOnCreated();
|
|
57
|
+
},
|
|
58
|
+
mounted() {
|
|
59
|
+
this.loadDataTableDataSource(), this.$nextTick(() => {
|
|
60
|
+
this.handleOnMounted();
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
beforeUnmount() {
|
|
64
|
+
this.unregisterFromRefList();
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
getDataTableRef() {
|
|
68
|
+
return this;
|
|
69
|
+
},
|
|
70
|
+
selectWidget(e) {
|
|
71
|
+
this.designer.setSelected(e);
|
|
72
|
+
},
|
|
73
|
+
handleOnCreated() {
|
|
74
|
+
this.widget.options.onCreated && new Function(this.widget.options.onCreated).call(this);
|
|
75
|
+
},
|
|
76
|
+
handleOnMounted() {
|
|
77
|
+
this.widget.options.onMounted && new Function(this.widget.options.onMounted).call(this);
|
|
78
|
+
},
|
|
79
|
+
// --------------------- 以下为组件支持外部调用的API方法 begin ------------------//
|
|
80
|
+
/* 提示:用户可自行扩充这些方法!!! */
|
|
81
|
+
getTableColumns() {
|
|
82
|
+
return this.widget.options.tableColumns;
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* 获取选中行数据,格式为对象数组
|
|
86
|
+
* @returns {[]}
|
|
87
|
+
*/
|
|
88
|
+
getSelectedRow() {
|
|
89
|
+
return this.selectedRows;
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* 获取选中行索引,格式为数组
|
|
93
|
+
* @returns {[]}
|
|
94
|
+
*/
|
|
95
|
+
getSelectedIndex() {
|
|
96
|
+
return this.selectedIndices;
|
|
97
|
+
}
|
|
98
|
+
// --------------------- 以上为组件支持外部调用的API方法 end ------------------//
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
function z(e, M, t, _, D, N) {
|
|
102
|
+
const d = n("a-empty"), m = n("RenderBodyCell"), c = n("s-table"), u = n("container-item-wrapper");
|
|
103
|
+
return y((r(), a(u, {
|
|
104
|
+
style: s({ display: "flex", minWidth: 0, height: parseFloat(e.tableHeight || 0) + "px" }),
|
|
105
|
+
widget: t.widget
|
|
106
|
+
}, {
|
|
107
|
+
default: i(() => [
|
|
108
|
+
l(c, {
|
|
109
|
+
class: R(["tpf-surely-table", [e.customClass]]),
|
|
110
|
+
ref: "dataTable2",
|
|
111
|
+
columns: e.columns.columns,
|
|
112
|
+
size: e.widgetSize,
|
|
113
|
+
dataSource: t.data,
|
|
114
|
+
"deep-watch-data-source": !0,
|
|
115
|
+
rowKey: (o) => o[t.widget.options.rowKey],
|
|
116
|
+
scroll: { y: parseFloat(e.tableHeight || 0), x: 300 },
|
|
117
|
+
bordered: t.widget.options.border,
|
|
118
|
+
style: s({ width: t.widget.options.tableWidth }),
|
|
119
|
+
"row-class-name": e.rowClassName,
|
|
120
|
+
rowSelection: e.handleRowSelection(),
|
|
121
|
+
pagination: e.fmtPagination,
|
|
122
|
+
customRow: e.handleCustomRow,
|
|
123
|
+
onChange: e.handleTablePageChange,
|
|
124
|
+
onResizeColumn: e.handleResizeColumn,
|
|
125
|
+
loading: e.loading,
|
|
126
|
+
"row-height": e.lineHeight
|
|
127
|
+
}, {
|
|
128
|
+
emptyText: i(() => [
|
|
129
|
+
l(d)
|
|
130
|
+
]),
|
|
131
|
+
bodyCell: i((o) => [
|
|
132
|
+
e.isShowBodyCell(o.column.dataIndex) ? (r(), a(m, {
|
|
133
|
+
key: 0,
|
|
134
|
+
bodyCell: e.columns.bodyCell,
|
|
135
|
+
scope: o
|
|
136
|
+
}, null, 8, ["bodyCell", "scope"])) : F("", !0)
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
}, 8, ["columns", "class", "size", "dataSource", "rowKey", "scroll", "bordered", "style", "row-class-name", "rowSelection", "pagination", "customRow", "onChange", "onResizeColumn", "loading", "row-height"])
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
}, 8, ["style", "widget"])), [
|
|
143
|
+
[S, !e.handleHidden()]
|
|
144
|
+
]);
|
|
145
|
+
}
|
|
146
|
+
const A = /* @__PURE__ */ I(T, [["render", z], ["__scopeId", "data-v-8e1059ce"]]);
|
|
147
|
+
export {
|
|
148
|
+
A as default
|
|
149
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import x from "../../../utils/emitter.js";
|
|
2
|
+
import C from "../../../utils/i18n.js";
|
|
3
|
+
import P from "../refMixin.js";
|
|
4
|
+
import _ from "../../form-designer/form-widget/field-widget/index.js";
|
|
5
|
+
import { resolveComponent as L, withDirectives as k, createBlock as d, openBlock as i, mergeProps as m, withCtx as l, createElementBlock as g, Fragment as p, renderList as u, resolveDynamicComponent as c, createSlots as w, renderSlot as h, createElementVNode as y, toDisplayString as F, vShow as v } from "vue";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import I from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
|
+
const S = {
|
|
9
|
+
name: "GridColItem",
|
|
10
|
+
componentName: "ContainerItem",
|
|
11
|
+
mixins: [x, C, P],
|
|
12
|
+
components: {
|
|
13
|
+
..._
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
widget: Object,
|
|
17
|
+
parentWidget: Object,
|
|
18
|
+
parentList: Array,
|
|
19
|
+
indexOfParentList: Number,
|
|
20
|
+
data: Object,
|
|
21
|
+
colHeight: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: null
|
|
24
|
+
},
|
|
25
|
+
subFormRowIndex: {
|
|
26
|
+
/* 子表单组件行索引,从0开始计数 */
|
|
27
|
+
type: Number,
|
|
28
|
+
default: -1
|
|
29
|
+
},
|
|
30
|
+
subFormColIndex: {
|
|
31
|
+
/* 子表单组件列索引,从0开始计数 */
|
|
32
|
+
type: Number,
|
|
33
|
+
default: -1
|
|
34
|
+
},
|
|
35
|
+
subFormRowId: {
|
|
36
|
+
/* 子表单组件行Id,唯一id且不可变 */
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
inject: ["refList", "globalModel", "getFormConfig", "previewState"],
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
layoutProps: {
|
|
45
|
+
span: this.widget.options.span,
|
|
46
|
+
md: this.widget.options.md || 12,
|
|
47
|
+
sm: this.widget.options.sm || 12,
|
|
48
|
+
xs: this.widget.options.xs || 12,
|
|
49
|
+
offset: this.widget.options.offset || 0,
|
|
50
|
+
push: this.widget.options.push || 0,
|
|
51
|
+
pull: this.widget.options.pull || 0
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
computed: {
|
|
56
|
+
isHidden() {
|
|
57
|
+
return this.widget.widgetList.some((t) => t.options.holdHidden ? !1 : t.options.hidden);
|
|
58
|
+
},
|
|
59
|
+
formConfig() {
|
|
60
|
+
return this.getFormConfig();
|
|
61
|
+
},
|
|
62
|
+
customClass() {
|
|
63
|
+
return this.widget.options.customClass || "";
|
|
64
|
+
},
|
|
65
|
+
colHeightStyle() {
|
|
66
|
+
return this.colHeight ? { height: this.colHeight + "px" } : {};
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
created() {
|
|
70
|
+
this.initLayoutProps(), this.initRefList();
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
initLayoutProps() {
|
|
74
|
+
if (this.widget.options.responsive)
|
|
75
|
+
if (this.previewState) {
|
|
76
|
+
this.layoutProps.md = void 0, this.layoutProps.sm = void 0, this.layoutProps.xs = void 0;
|
|
77
|
+
const t = this.formConfig.layoutType;
|
|
78
|
+
t === "H5" ? this.layoutProps.span = this.widget.options.xs || 12 : t === "Pad" ? this.layoutProps.span = this.widget.options.sm || 12 : this.layoutProps.span = this.widget.options.md || 12;
|
|
79
|
+
} else
|
|
80
|
+
this.layoutProps.span = void 0;
|
|
81
|
+
else
|
|
82
|
+
this.layoutProps.md = void 0, this.layoutProps.sm = void 0, this.layoutProps.xs = void 0;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}, H = { class: "blank-cell" }, R = { class: "invisible-content" };
|
|
86
|
+
function j(t, O, e, N, b, n) {
|
|
87
|
+
const f = L("a-col");
|
|
88
|
+
return k((i(), d(f, m({
|
|
89
|
+
class: ["grid-cell", [n.customClass]]
|
|
90
|
+
}, b.layoutProps, {
|
|
91
|
+
style: n.colHeightStyle,
|
|
92
|
+
key: e.widget.id
|
|
93
|
+
}), {
|
|
94
|
+
default: l(() => [
|
|
95
|
+
e.widget.widgetList && e.widget.widgetList.length > 0 ? (i(!0), g(p, { key: 0 }, u(e.widget.widgetList, (o, r) => (i(), g(p, null, [
|
|
96
|
+
o.category === "container" ? (i(), d(c(t.getComponentByContainer(o)), {
|
|
97
|
+
widget: o,
|
|
98
|
+
key: r,
|
|
99
|
+
"parent-list": e.widget.widgetList,
|
|
100
|
+
"index-of-parent-list": r,
|
|
101
|
+
"parent-widget": e.widget,
|
|
102
|
+
"sub-form-row-id": e.subFormRowId,
|
|
103
|
+
"sub-form-row-index": e.subFormRowIndex,
|
|
104
|
+
"sub-form-col-index": e.subFormColIndex,
|
|
105
|
+
data: e.data,
|
|
106
|
+
model: n.globalModel
|
|
107
|
+
}, w({ _: 2 }, [
|
|
108
|
+
u(Object.keys(t.$slots), (s) => ({
|
|
109
|
+
name: s,
|
|
110
|
+
fn: l((a) => [
|
|
111
|
+
h(t.$slots, s, m({ ref_for: !0 }, a), void 0, !0)
|
|
112
|
+
])
|
|
113
|
+
}))
|
|
114
|
+
]), 1032, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "data", "model"])) : (i(), d(c(o.type + "-widget"), {
|
|
115
|
+
field: o,
|
|
116
|
+
designer: null,
|
|
117
|
+
key: r,
|
|
118
|
+
"parent-list": e.widget.widgetList,
|
|
119
|
+
"index-of-parent-list": r,
|
|
120
|
+
"parent-widget": e.widget,
|
|
121
|
+
"sub-form-row-id": e.subFormRowId,
|
|
122
|
+
"sub-form-row-index": e.subFormRowIndex,
|
|
123
|
+
"sub-form-col-index": e.subFormColIndex
|
|
124
|
+
}, w({ _: 2 }, [
|
|
125
|
+
u(Object.keys(t.$slots), (s) => ({
|
|
126
|
+
name: s,
|
|
127
|
+
fn: l((a) => [
|
|
128
|
+
h(t.$slots, s, m({ ref_for: !0 }, a), void 0, !0)
|
|
129
|
+
])
|
|
130
|
+
}))
|
|
131
|
+
]), 1032, ["field", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"]))
|
|
132
|
+
], 64))), 256)) : (i(), d(f, { key: 1 }, {
|
|
133
|
+
default: l(() => [
|
|
134
|
+
y("div", H, [
|
|
135
|
+
y("span", R, F(t.i18nt("render.hint.blankCellContent")), 1)
|
|
136
|
+
])
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
}))
|
|
140
|
+
]),
|
|
141
|
+
_: 3
|
|
142
|
+
}, 16, ["class", "style"])), [
|
|
143
|
+
[v, !n.isHidden && !e.widget.options.hidden]
|
|
144
|
+
]);
|
|
145
|
+
}
|
|
146
|
+
const V = /* @__PURE__ */ I(S, [["render", j], ["__scopeId", "data-v-8b0497df"]]);
|
|
147
|
+
export {
|
|
148
|
+
V as default
|
|
149
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import g from "../../../utils/emitter.js";
|
|
2
|
+
import w from "../../../utils/i18n.js";
|
|
3
|
+
import b from "../refMixin.js";
|
|
4
|
+
import _ from "./container-item-wrapper.vue.js";
|
|
5
|
+
import p from "./grid-col-item.vue.js";
|
|
6
|
+
import h from "./containerItemMixin.js";
|
|
7
|
+
import { resolveComponent as i, createBlock as r, openBlock as t, withCtx as n, withDirectives as x, normalizeClass as I, createElementBlock as C, Fragment as F, renderList as a, createSlots as R, renderSlot as k, mergeProps as y, vShow as j } from "vue";
|
|
8
|
+
import L from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
+
const v = {
|
|
10
|
+
name: "vf-grid-item",
|
|
11
|
+
//grid-item跟VueGridLayout全局注册组件重名,故特殊处理!!
|
|
12
|
+
componentName: "ContainerItem",
|
|
13
|
+
mixins: [g, w, b, h],
|
|
14
|
+
components: {
|
|
15
|
+
ContainerItemWrapper: _,
|
|
16
|
+
GridColItem: p
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
widget: Object,
|
|
20
|
+
model: Object,
|
|
21
|
+
data: Object,
|
|
22
|
+
subFormRowIndex: {
|
|
23
|
+
/* 子表单组件行索引,从0开始计数 */
|
|
24
|
+
type: Number,
|
|
25
|
+
default: -1
|
|
26
|
+
},
|
|
27
|
+
subFormColIndex: {
|
|
28
|
+
/* 子表单组件列索引,从0开始计数 */
|
|
29
|
+
type: Number,
|
|
30
|
+
default: -1
|
|
31
|
+
},
|
|
32
|
+
subFormRowId: {
|
|
33
|
+
/* 子表单组件行Id,唯一id且不可变 */
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
inject: ["refList", "sfRefList", "globalModel"],
|
|
39
|
+
created() {
|
|
40
|
+
this.initRefList();
|
|
41
|
+
},
|
|
42
|
+
mounted() {
|
|
43
|
+
},
|
|
44
|
+
beforeUnmount() {
|
|
45
|
+
this.unregisterFromRefList();
|
|
46
|
+
},
|
|
47
|
+
methods: {}
|
|
48
|
+
};
|
|
49
|
+
function O(o, S, e, B, M, N) {
|
|
50
|
+
const s = i("grid-col-item"), l = i("a-row"), c = i("container-item-wrapper");
|
|
51
|
+
return t(), r(c, { widget: e.widget }, {
|
|
52
|
+
default: n(() => [
|
|
53
|
+
x((t(), r(l, {
|
|
54
|
+
key: e.widget.id,
|
|
55
|
+
gutter: e.widget.options.gutter,
|
|
56
|
+
class: I(["grid-container", [o.customClass]]),
|
|
57
|
+
ref: e.widget.id
|
|
58
|
+
}, {
|
|
59
|
+
default: n(() => [
|
|
60
|
+
(t(!0), C(F, null, a(e.widget.cols, (f, m) => (t(), r(s, {
|
|
61
|
+
key: m,
|
|
62
|
+
model: e.model,
|
|
63
|
+
data: e.data,
|
|
64
|
+
widget: f,
|
|
65
|
+
"parent-list": e.widget.cols,
|
|
66
|
+
"index-of-parent-list": m,
|
|
67
|
+
"parent-widget": e.widget,
|
|
68
|
+
"col-height": e.widget.options.colHeight,
|
|
69
|
+
"sub-form-row-id": e.subFormRowId,
|
|
70
|
+
"sub-form-row-index": e.subFormRowIndex,
|
|
71
|
+
"sub-form-col-index": e.subFormColIndex
|
|
72
|
+
}, R({ _: 2 }, [
|
|
73
|
+
a(Object.keys(o.$slots), (d) => ({
|
|
74
|
+
name: d,
|
|
75
|
+
fn: n((u) => [
|
|
76
|
+
k(o.$slots, d, y({ ref_for: !0 }, u))
|
|
77
|
+
])
|
|
78
|
+
}))
|
|
79
|
+
]), 1032, ["model", "data", "widget", "parent-list", "index-of-parent-list", "parent-widget", "col-height", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"]))), 128))
|
|
80
|
+
]),
|
|
81
|
+
_: 3
|
|
82
|
+
}, 8, ["gutter", "class"])), [
|
|
83
|
+
[j, !e.widget.options.hidden]
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
_: 3
|
|
87
|
+
}, 8, ["widget"]);
|
|
88
|
+
}
|
|
89
|
+
const q = /* @__PURE__ */ L(v, [["render", O]]);
|
|
90
|
+
export {
|
|
91
|
+
q as default
|
|
92
|
+
};
|