@byteluck-fe/model-driven-upgrade 2.8.1-alpha.12-d → 2.8.1-alpha.12-f

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-20 18:01:31
6
+ * @LastEditTime: 2023-12-22 08:42:05
7
7
  */ function _define_property(obj, key, value) {
8
8
  if (key in obj) {
9
9
  Object.defineProperty(obj, key, {
@@ -99,6 +99,10 @@ function conversion(schema, payload) {
99
99
  {
100
100
  key: "total_count",
101
101
  value: 0
102
+ },
103
+ {
104
+ key: "is_show_selection",
105
+ value: false
102
106
  }
103
107
  ]), _define_property(_obj, CONTROL_TYPE.LIST_VIEW, [
104
108
  {
@@ -108,6 +112,10 @@ function conversion(schema, payload) {
108
112
  {
109
113
  key: "row_style_type",
110
114
  value: "none"
115
+ },
116
+ {
117
+ key: "is_show_selection",
118
+ value: false
111
119
  }
112
120
  ]), _define_property(_obj, CONTROL_TYPE.SIMPLE_SEARCH, [
113
121
  {
@@ -118,16 +126,16 @@ function conversion(schema, payload) {
118
126
  key: "child-min-width",
119
127
  value: 230
120
128
  }
121
- ]), _define_property(_obj, CONTROL_TYPE.OPERATION_COLUMN, [
122
- {
123
- key: "limit",
124
- value: 3
125
- }
126
129
  ]), _define_property(_obj, CONTROL_TYPE.IMPORT_RECORD_LIST_BUTTON, [
127
130
  {
128
131
  key: "template-type",
129
132
  value: "system"
130
133
  }
134
+ ]), _define_property(_obj, CONTROL_TYPE.OPERATION_COLUMN, [
135
+ {
136
+ key: "limit",
137
+ value: 3
138
+ }
131
139
  ]), _obj);
132
140
  if (schema.type in addKeysDefaultValueMapping) {
133
141
  addKeysDefaultValueMapping[schema.type].forEach(function(item) {
@@ -136,6 +144,17 @@ function conversion(schema, payload) {
136
144
  }
137
145
  });
138
146
  }
147
+ if (schema.type === CONTROL_TYPE.GRID_TABLE) {
148
+ var gridTableInstance = schema;
149
+ gridTableInstance.props.headers.forEach(function(item) {
150
+ if (item.type === CONTROL_TYPE.OPERATION_COLUMN) {
151
+ var operationColumnInstance = item;
152
+ if (operationColumnInstance.props.limit === undefined) {
153
+ operationColumnInstance.props.limit = 3;
154
+ }
155
+ }
156
+ });
157
+ }
139
158
  //将操作项按钮的完成时事件转成点击时事件
140
159
  conversionListener(payload);
141
160
  return schema;
@@ -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-11-21 15:21:23
6
+ * @LastEditTime: 2023-12-21 11:12:25
7
7
  */ import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
8
8
  var dataCleaner = function(schemaItems, payload) {
9
9
  var isArray = Array.isArray(schemaItems);
@@ -34,6 +34,7 @@ function conversion(schema, payload) {
34
34
  });
35
35
  if (isOpenCheckbox === true) {
36
36
  schema.props.is_show_selection = true;
37
+ item.props.is_show_selection = true;
37
38
  }
38
39
  }
39
40
  });