@byteluck-fe/model-driven-upgrade 2.9.0-alpha.6 → 2.9.0-alpha.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.
@@ -3,7 +3,7 @@
3
3
  * @Autor: SuperLucky-Q
4
4
  * @Date: 2023-02-16 14:45:22
5
5
  * @LastEditors: SuperLuckyqi
6
- * @LastEditTime: 2023-12-21 11:11:00
6
+ * @LastEditTime: 2023-12-22 09:29:55
7
7
  */ function _define_property(obj, key, value) {
8
8
  if (key in obj) {
9
9
  Object.defineProperty(obj, key, {
@@ -33,6 +33,7 @@ function conversion(schema, payload) {
33
33
  //标题组件控件兼容老数据 config 默认展示标题
34
34
  if (schema.type === CONTROL_TYPE.SUBTABLE) {
35
35
  schema.props.headers.map(function(item) {
36
+ var _item_children;
36
37
  item.props.meta_auto_width = new MetaAutoWidth();
37
38
  if (item.props.width_type === "px") {
38
39
  item.props.meta_auto_width.pc.width = item.props.width;
@@ -40,6 +41,15 @@ function conversion(schema, payload) {
40
41
  }
41
42
  delete item.props.width;
42
43
  delete item.props.width_type;
44
+ var childCtl = (_item_children = item.children) === null || _item_children === void 0 ? void 0 : _item_children[0];
45
+ if (childCtl) {
46
+ //2023-12-24 qiyu 保证低版本升级上来时,默认是开启的
47
+ if (childCtl.type === CONTROL_TYPE.CALC) {
48
+ if (childCtl.props.calc_on_mounted === undefined) {
49
+ childCtl.props.calc_on_mounted = true;
50
+ }
51
+ }
52
+ }
43
53
  });
44
54
  // if (schema.props.page_index === undefined) {
45
55
  // schema.props.page_index = 1
@@ -126,11 +136,6 @@ function conversion(schema, payload) {
126
136
  key: "child-min-width",
127
137
  value: 230
128
138
  }
129
- ]), _define_property(_obj, CONTROL_TYPE.OPERATION_COLUMN, [
130
- {
131
- key: "limit",
132
- value: 3
133
- }
134
139
  ]), _define_property(_obj, CONTROL_TYPE.IMPORT_RECORD_LIST_BUTTON, [
135
140
  {
136
141
  key: "template-type",
@@ -144,6 +149,25 @@ function conversion(schema, payload) {
144
149
  }
145
150
  });
146
151
  }
152
+ if (schema.type === CONTROL_TYPE.GRID_TABLE) {
153
+ var gridTableInstance = schema;
154
+ schema.props.headers.forEach(function(item) {
155
+ if (item.type === CONTROL_TYPE.OPERATION_COLUMN) {
156
+ if (item.props.limit === undefined) {
157
+ item.props.limit = 3;
158
+ }
159
+ if (item.props.show_type === undefined) {
160
+ item.props.show_type = "icon";
161
+ }
162
+ }
163
+ });
164
+ }
165
+ //2023-12-24 qiyu 保证低版本升级上来时,默认是开启的
166
+ if (schema.type === CONTROL_TYPE.CALC) {
167
+ if (schema.props.calc_on_mounted === undefined) {
168
+ schema.props.calc_on_mounted = true;
169
+ }
170
+ }
147
171
  //将操作项按钮的完成时事件转成点击时事件
148
172
  conversionListener(payload);
149
173
  return schema;