@byteluck-fe/model-driven-upgrade 2.8.1-alpha.3 → 2.8.1-alpha.5
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/dist/esm/upgrade/v3_1.js +23 -1
- package/dist/index.umd.js +1 -1
- package/package.json +5 -5
package/dist/esm/upgrade/v3_1.js
CHANGED
|
@@ -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-
|
|
6
|
+
* @LastEditTime: 2023-11-21 14:56:03
|
|
7
7
|
*/ function _define_property(obj, key, value) {
|
|
8
8
|
if (key in obj) {
|
|
9
9
|
Object.defineProperty(obj, key, {
|
|
@@ -55,6 +55,7 @@ function conversion(schema, payload) {
|
|
|
55
55
|
// }
|
|
56
56
|
}
|
|
57
57
|
var _obj;
|
|
58
|
+
//默认值 赋值
|
|
58
59
|
var addKeysDefaultValueMapping = (_obj = {}, _define_property(_obj, CONTROL_TYPE.SUBTABLE, [
|
|
59
60
|
{
|
|
60
61
|
key: "page_index",
|
|
@@ -125,6 +126,27 @@ function conversion(schema, payload) {
|
|
|
125
126
|
}
|
|
126
127
|
});
|
|
127
128
|
}
|
|
129
|
+
// 4.5.0-lh2 列表批量选择需求 -> 如果历史数据 or 新数据内存在 batch 操作 则将复选框开启。
|
|
130
|
+
if (schema.type === CONTROL_TYPE.LIST_VIEW && schema.props.is_show_selection === false) {
|
|
131
|
+
var batchButtonTypes = [
|
|
132
|
+
CONTROL_TYPE.BATCH_SUBMISSION_LIST_BUTTON,
|
|
133
|
+
CONTROL_TYPE.LIST_PAGE_BTN_BATCH_PRINT,
|
|
134
|
+
CONTROL_TYPE.BATCH_DELETE_LIST_BUTTON
|
|
135
|
+
];
|
|
136
|
+
schema.children.forEach(function(item) {
|
|
137
|
+
if (item.type === CONTROL_TYPE.GRID_TABLE) {
|
|
138
|
+
var childrenType = item.children.map(function(tableItem) {
|
|
139
|
+
return tableItem.type;
|
|
140
|
+
});
|
|
141
|
+
var isOpenCheckbox = childrenType.some(function(type) {
|
|
142
|
+
return batchButtonTypes.includes(type);
|
|
143
|
+
});
|
|
144
|
+
if (isOpenCheckbox === true) {
|
|
145
|
+
schema.props.is_show_selection = true;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
128
150
|
//将操作项按钮的完成时事件转成点击时事件
|
|
129
151
|
conversionListener(payload);
|
|
130
152
|
return schema;
|