@byteluck-fe/model-driven-upgrade 6.2.0-2-beta.2 → 6.2.0-2-beta.3
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.
|
@@ -24,6 +24,7 @@ import { dataCleaner as dataCleanerV3_9toV3_11 } from './v3_11';
|
|
|
24
24
|
import { dataCleaner as dataCleanerV3_9toV3_12 } from './v3_12';
|
|
25
25
|
import { dataCleaner as dataCleanerV3_9toV3_13 } from './v3_13';
|
|
26
26
|
import { dataCleaner as dataCleanerV3_9toV3_14 } from './v3_14';
|
|
27
|
+
import { dataCleaner as dataCleanerV3_9toV3_15 } from './v3_15';
|
|
27
28
|
// TODO 切记复制粘贴的时候改一下from后边的路径,不然会出事儿
|
|
28
29
|
// TODO 注意从2.5版本开始,没有进行驼峰转下划线了,写的时候要注意
|
|
29
30
|
export default {
|
|
@@ -54,5 +55,6 @@ export default {
|
|
|
54
55
|
'v3.12': dataCleanerV3_9toV3_12,
|
|
55
56
|
'v3.13': dataCleanerV3_9toV3_13,
|
|
56
57
|
'v3.14': dataCleanerV3_9toV3_14,
|
|
57
|
-
'v3.15':
|
|
58
|
+
'v3.15': dataCleanerV3_9toV3_15,
|
|
59
|
+
'v3.16': function() {}
|
|
58
60
|
};
|
package/dist/esm/upgrade/v3_1.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @Description: subtable-column 数据转换
|
|
3
|
-
* @Autor: SuperLucky-Q
|
|
4
|
-
* @Date: 2023-02-16 14:45:22
|
|
5
|
-
* @LastEditors: SuperLuckyqi
|
|
6
|
-
* @LastEditTime: 2024-01-11 08:12:17
|
|
7
|
-
*/ function _define_property(obj, key, value) {
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
8
2
|
if (key in obj) {
|
|
9
3
|
Object.defineProperty(obj, key, {
|
|
10
4
|
value: value,
|
|
@@ -17,7 +11,13 @@
|
|
|
17
11
|
}
|
|
18
12
|
return obj;
|
|
19
13
|
}
|
|
20
|
-
|
|
14
|
+
/*
|
|
15
|
+
* @Description: subtable-column 数据转换
|
|
16
|
+
* @Autor: SuperLucky-Q
|
|
17
|
+
* @Date: 2023-02-16 14:45:22
|
|
18
|
+
* @LastEditors: SuperLuckyqi
|
|
19
|
+
* @LastEditTime: 2024-01-11 08:12:17
|
|
20
|
+
*/ import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
|
|
21
21
|
import { MetaAutoWidth, AutoWidth } from '@byteluck-fe/model-driven-core';
|
|
22
22
|
var dataCleaner = function(schemaItems, payload) {
|
|
23
23
|
var isArray = Array.isArray(schemaItems);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Description: subtable-column 数据转换
|
|
3
|
+
* @Autor: SuperLucky-Q
|
|
4
|
+
* @Date: 2024-01-22 14:16:13
|
|
5
|
+
* @LastEditors: SuperLuckyqi
|
|
6
|
+
* @LastEditTime: 2024-01-22 14:19:43
|
|
7
|
+
*/ import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
|
|
8
|
+
var dataCleaner = function(schemaItems, payload) {
|
|
9
|
+
var isArray = Array.isArray(schemaItems);
|
|
10
|
+
var schemaArray = isArray ? schemaItems : [
|
|
11
|
+
schemaItems
|
|
12
|
+
];
|
|
13
|
+
var new_schema = loop(schemaArray, function(item) {
|
|
14
|
+
return conversion(item, payload);
|
|
15
|
+
});
|
|
16
|
+
return isArray ? new_schema : new_schema[0];
|
|
17
|
+
};
|
|
18
|
+
function conversion(schema, payload) {
|
|
19
|
+
if (schema.type === CONTROL_TYPE.SUBTABLE) {
|
|
20
|
+
schema.props.headers.forEach(function(item) {
|
|
21
|
+
if ([
|
|
22
|
+
CONTROL_TYPE.INPUT,
|
|
23
|
+
CONTROL_TYPE.TEXTAREA,
|
|
24
|
+
CONTROL_TYPE.RICH_TEXT
|
|
25
|
+
].includes(item.children[0].type)) {
|
|
26
|
+
if (item.children[0].props.auto_height === undefined) {
|
|
27
|
+
item.children[0].props.line_ellipsis = 1;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return schema;
|
|
33
|
+
}
|
|
34
|
+
export { dataCleaner };
|