@steedos-widgets/amis-lib 3.6.0-beta.6 → 3.6.0-beta.7
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/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +14 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +8 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/fields/lookup.d.ts +6 -2
- package/dist/types/lib/converter/amis/fields/table.d.ts +3 -1
- package/dist/types/lib/converter/amis/header.d.ts +1 -0
- package/dist/types/lib/objects.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -2577,6 +2577,14 @@ async function getTableSchema$1(fields, options){
|
|
|
2577
2577
|
|
|
2578
2578
|
}
|
|
2579
2579
|
|
|
2580
|
+
const treeConfig = {};
|
|
2581
|
+
|
|
2582
|
+
if(options.enable_tree){
|
|
2583
|
+
treeConfig.expandConfig = {
|
|
2584
|
+
expand: 'first'
|
|
2585
|
+
};
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2580
2588
|
return {
|
|
2581
2589
|
mode: "table",
|
|
2582
2590
|
perPageAvailable: [5, 10, 20, 50, 100, 500],
|
|
@@ -2592,6 +2600,7 @@ async function getTableSchema$1(fields, options){
|
|
|
2592
2600
|
labelTpl: `\${${options.labelFieldName}}`,
|
|
2593
2601
|
autoFillHeight: false, // 自动高度效果不理想,先关闭
|
|
2594
2602
|
columnsTogglable: false,
|
|
2603
|
+
...treeConfig
|
|
2595
2604
|
}
|
|
2596
2605
|
}
|
|
2597
2606
|
|
|
@@ -2908,17 +2917,6 @@ async function getTableApi(mainObject, fields, options){
|
|
|
2908
2917
|
payload.data.rows = getTreeOptions(records,{"valueField":"_id"});
|
|
2909
2918
|
assignIndexToTreeRecords(payload.data.rows, '');
|
|
2910
2919
|
}
|
|
2911
|
-
try{
|
|
2912
|
-
setTimeout(() => {
|
|
2913
|
-
let expandBtn = $('.steedos-object-listview-content .antd-Table-content .antd-Table-table thead .antd-Table-expandBtn');
|
|
2914
|
-
if(expandBtn && expandBtn.length > 0 && !expandBtn.hasClass("is-active")){
|
|
2915
|
-
expandBtn[0].click();
|
|
2916
|
-
}
|
|
2917
|
-
}, 600);
|
|
2918
|
-
}
|
|
2919
|
-
catch(ex){
|
|
2920
|
-
console.error("tree数据格式展开异常:", ex);
|
|
2921
|
-
}
|
|
2922
2920
|
}
|
|
2923
2921
|
|
|
2924
2922
|
|
|
@@ -6509,7 +6507,10 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
|
|
|
6509
6507
|
"@history_paths.changed": {
|
|
6510
6508
|
"actions": [
|
|
6511
6509
|
{
|
|
6512
|
-
"actionType": "reload"
|
|
6510
|
+
"actionType": "reload",
|
|
6511
|
+
// amis 3.6需要传入data来触发下面的window:historyPaths重新计算,此问题随机偶发,加上data后正常
|
|
6512
|
+
"data": {
|
|
6513
|
+
}
|
|
6513
6514
|
}
|
|
6514
6515
|
]
|
|
6515
6516
|
}
|
|
@@ -10737,14 +10738,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
10737
10738
|
}
|
|
10738
10739
|
});
|
|
10739
10740
|
payload.data.rows = treeRecords;
|
|
10740
|
-
try{
|
|
10741
|
-
setTimeout(() => {
|
|
10742
|
-
$('.amis-dialog-widget.antd-Modal .antd-Table-content .antd-Table-table thead .antd-Table-expandBtn')[0]?.click();
|
|
10743
|
-
}, 600);
|
|
10744
|
-
}
|
|
10745
|
-
catch(ex){
|
|
10746
|
-
console.error("tree数据格式展开异常:", ex);
|
|
10747
|
-
}
|
|
10748
10741
|
}
|
|
10749
10742
|
return payload;
|
|
10750
10743
|
`;
|
|
@@ -10771,6 +10764,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
10771
10764
|
labelFieldName,
|
|
10772
10765
|
top: top,
|
|
10773
10766
|
isLookup: true,
|
|
10767
|
+
enable_tree: refObjectConfig.enable_tree,
|
|
10774
10768
|
...ctx
|
|
10775
10769
|
});
|
|
10776
10770
|
|