@kp-ui/lowcode 2.14.0-beta.1 → 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.
Files changed (55) hide show
  1. package/install.js +26 -25
  2. package/package.json +2 -2
  3. package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +1 -1
  4. package/src/components/form-designer/index.vue.js +55 -54
  5. package/src/components/form-designer/setting-panel/form-crud-setting.vue.js +62 -23
  6. package/src/components/form-designer/setting-panel/index.vue.js +4 -323
  7. package/src/components/form-designer/setting-panel/index.vue2.js +273 -0
  8. package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +5 -4
  9. package/src/components/form-designer/setting-panel/property-editor/container-data-table/customRowEvent/data-table-customRow-editor.vue.js +1 -0
  10. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +5 -4
  11. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-pagination-editor.vue.js +1 -0
  12. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-selections-editor.vue2.js +19 -18
  13. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +9 -8
  14. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +1 -1
  15. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +7 -6
  16. package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/bodyStyle-editor.vue2.js +7 -6
  17. package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue.js +2 -40
  18. package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue2.js +41 -0
  19. package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue.js +2 -47
  20. package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue2.js +44 -0
  21. package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue.js +2 -47
  22. package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue2.js +43 -0
  23. package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue.js +2 -46
  24. package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue2.js +43 -0
  25. package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue.js +2 -47
  26. package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue2.js +44 -0
  27. package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue.js +2 -66
  28. package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue2.js +42 -0
  29. package/src/components/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue.js +5 -4
  30. package/src/components/form-designer/setting-panel/property-editor/hidden-editor.vue.js +6 -5
  31. package/src/components/form-designer/setting-panel/property-editor/index.js +98 -99
  32. package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue.js +8 -7
  33. package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue.js +38 -35
  34. package/src/components/form-render/container-item/data-table-item.vue.js +149 -0
  35. package/src/components/form-render/container-item/grid-col-item.vue.js +149 -0
  36. package/src/components/form-render/container-item/grid-item.vue.js +92 -0
  37. package/src/components/form-render/container-item/grid-sub-form-item.vue.js +319 -0
  38. package/src/components/form-render/container-item/index.js +24 -0
  39. package/src/components/form-render/container-item/sub-form-item.vue.js +429 -0
  40. package/src/components/form-render/container-item/tab-item.vue.js +160 -0
  41. package/src/components/form-render/container-item/table-cell-item.vue.js +95 -0
  42. package/src/components/form-render/container-item/table-item.vue.js +96 -0
  43. package/src/components/form-render/container-item/vf-collapse-item.vue.js +252 -0
  44. package/src/components/form-render/container-item/vf-dialog-item.vue.js +12 -0
  45. package/src/components/form-render/container-item/vf-drawer-item.vue.js +12 -0
  46. package/src/components/form-render/index.vue.js +2 -1
  47. package/src/components/http-editor/index.vue.js +10 -10
  48. package/src/components/public/ActionButtonListRender.vue.js +19 -24
  49. package/src/lang/en-US.js +1 -3
  50. package/src/lang/zh-CN.js +0 -3
  51. package/src/utils/useEmitter.js +57 -0
  52. package/src/utils/util.js +50 -49
  53. package/stats.html +1 -1
  54. package/styles/style.css +1 -1
  55. package/src/components/form-designer/setting-panel/property-editor/event-handler/onVformAdd-editor.vue.js +0 -49
@@ -1,20 +1,21 @@
1
- import h from "../../../../utils/i18n.js";
2
- import _ from "../option-items-setting.vue.js";
3
- import b from "./propertyMixin.js";
1
+ import b from "../../../../utils/i18n.js";
2
+ import h from "../option-items-setting.vue.js";
3
+ import _ from "./propertyMixin.js";
4
4
  import { getDSByName as M } from "../../../../utils/util.js";
5
5
  import y from "../../../http-editor/index.vue.js";
6
- import { resolveComponent as a, createElementBlock as S, openBlock as s, Fragment as v, createVNode as i, createBlock as m, createCommentVNode as u, withCtx as l, createTextVNode as w, toDisplayString as k } from "vue";
6
+ import { resolveComponent as a, createElementBlock as S, openBlock as s, Fragment as v, createVNode as n, createBlock as m, createCommentVNode as u, withCtx as l, createTextVNode as w, toDisplayString as k } from "vue";
7
7
  import C from "../../../../../_virtual/_plugin-vue_export-helper.js";
8
8
  const E = {
9
9
  name: "optionItems-editor",
10
- mixins: [h, b],
10
+ mixins: [b, _],
11
+ inheritAttrs: !1,
11
12
  props: {
12
13
  designer: Object,
13
14
  selectedWidget: Object,
14
15
  optionModel: Object
15
16
  },
16
17
  components: {
17
- OptionItemsSetting: _,
18
+ OptionItemsSetting: h,
18
19
  HttpEditor: y
19
20
  },
20
21
  data() {
@@ -29,18 +30,18 @@ const E = {
29
30
  },
30
31
  watch: {
31
32
  selectedWidget: {
32
- handler(o, t) {
33
- o && this.loadDataSet(o.options.dsName);
33
+ handler(t, i) {
34
+ t && this.loadDataSet(t.options.dsName);
34
35
  },
35
36
  immediate: !0
36
37
  }
37
38
  },
38
39
  methods: {
39
- loadDataSet(o) {
40
- if (this.dataSetList.length = 0, !o)
40
+ loadDataSet(t) {
41
+ if (this.dataSetList.length = 0, !t)
41
42
  return;
42
- const t = M(this.designer.formConfig, o);
43
- t && t.dataSets && t.dataSets.forEach((e) => {
43
+ const i = M(this.designer.formConfig, t);
44
+ i && i.dataSets && i.dataSets.forEach((e) => {
44
45
  this.dataSetList.push({
45
46
  name: e.name,
46
47
  remark: e.remark
@@ -52,67 +53,67 @@ const E = {
52
53
  }
53
54
  }
54
55
  };
55
- function K(o, t, e, N, D, L) {
56
+ function K(t, i, e, N, D, L) {
56
57
  const g = a("a-divider"), d = a("a-form-item"), r = a("a-input"), c = a("a-switch"), f = a("HttpEditor"), p = a("option-items-setting");
57
58
  return s(), S(v, null, [
58
- i(d, { "label-width": "0" }, {
59
+ n(d, { "label-width": "0" }, {
59
60
  default: l(() => [
60
- i(g, { class: "custom-divider-margin-top" }, {
61
+ n(g, { class: "custom-divider-margin-top" }, {
61
62
  default: l(() => [
62
- w(k(o.i18nt("designer.setting.optionsSetting")), 1)
63
+ w(k(t.i18nt("designer.setting.optionsSetting")), 1)
63
64
  ]),
64
65
  _: 1
65
66
  })
66
67
  ]),
67
68
  _: 1
68
69
  }),
69
- i(d, {
70
- label: o.i18nt("designer.setting.labelKeyName")
70
+ n(d, {
71
+ label: t.i18nt("designer.setting.labelKeyName")
71
72
  }, {
72
73
  default: l(() => [
73
- i(r, {
74
+ n(r, {
74
75
  size: "small",
75
76
  value: e.optionModel.labelKey,
76
- "onUpdate:value": t[0] || (t[0] = (n) => e.optionModel.labelKey = n),
77
+ "onUpdate:value": i[0] || (i[0] = (o) => e.optionModel.labelKey = o),
77
78
  allowClear: ""
78
79
  }, null, 8, ["value"])
79
80
  ]),
80
81
  _: 1
81
82
  }, 8, ["label"]),
82
- i(d, {
83
- label: o.i18nt("designer.setting.valueKeyName")
83
+ n(d, {
84
+ label: t.i18nt("designer.setting.valueKeyName")
84
85
  }, {
85
86
  default: l(() => [
86
- i(r, {
87
+ n(r, {
87
88
  size: "small",
88
89
  value: e.optionModel.valueKey,
89
- "onUpdate:value": t[1] || (t[1] = (n) => e.optionModel.valueKey = n),
90
+ "onUpdate:value": i[1] || (i[1] = (o) => e.optionModel.valueKey = o),
90
91
  allowClear: ""
91
92
  }, null, 8, ["value"])
92
93
  ]),
93
94
  _: 1
94
95
  }, 8, ["label"]),
95
- o.hasConfig("childrenKey") ? (s(), m(d, {
96
+ t.hasConfig("childrenKey") ? (s(), m(d, {
96
97
  key: 0,
97
- label: o.i18nt("designer.setting.childrenKeyName")
98
+ label: t.i18nt("designer.setting.childrenKeyName")
98
99
  }, {
99
100
  default: l(() => [
100
- i(r, {
101
+ n(r, {
101
102
  size: "small",
102
103
  value: e.optionModel.childrenKey,
103
- "onUpdate:value": t[2] || (t[2] = (n) => e.optionModel.childrenKey = n),
104
+ "onUpdate:value": i[2] || (i[2] = (o) => e.optionModel.childrenKey = o),
104
105
  allowClear: ""
105
106
  }, null, 8, ["value"])
106
107
  ]),
107
108
  _: 1
108
109
  }, 8, ["label"])) : u("", !0),
109
- i(d, {
110
- label: o.i18nt("designer.setting.dsEnabled")
110
+ n(d, {
111
+ label: t.i18nt("designer.setting.dsEnabled")
111
112
  }, {
112
113
  default: l(() => [
113
- i(c, {
114
+ n(c, {
114
115
  checked: e.optionModel.dsEnabled,
115
- "onUpdate:checked": t[3] || (t[3] = (n) => e.optionModel.dsEnabled = n)
116
+ "onUpdate:checked": i[3] || (i[3] = (o) => e.optionModel.dsEnabled = o)
116
117
  }, null, 8, ["checked"])
117
118
  ]),
118
119
  _: 1
@@ -121,14 +122,16 @@ function K(o, t, e, N, D, L) {
121
122
  key: 1,
122
123
  designer: e.designer,
123
124
  "selected-widget": e.selectedWidget,
124
- optionModel: e.optionModel
125
- }, null, 8, ["designer", "selected-widget", "optionModel"])) : u("", !0),
125
+ optionModel: e.optionModel,
126
+ label: t.i18nt("designer.setting.dsName"),
127
+ "button-name": t.i18nt("designer.setting.editAction")
128
+ }, null, 8, ["designer", "selected-widget", "optionModel", "label", "button-name"])) : u("", !0),
126
129
  e.optionModel.dsEnabled ? u("", !0) : (s(), m(d, {
127
130
  key: 2,
128
131
  "label-width": "0"
129
132
  }, {
130
133
  default: l(() => [
131
- i(p, {
134
+ n(p, {
132
135
  designer: e.designer,
133
136
  "selected-widget": e.selectedWidget
134
137
  }, null, 8, ["designer", "selected-widget"])
@@ -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
+ };