@steedos-widgets/amis-lib 6.10.1-beta.32 → 6.10.1-beta.33
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 +12 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/toolbars/setting_listview/filters.d.ts +0 -1
- package/dist/types/lib/converter/amis/toolbars/setting_listview.d.ts +0 -1
- package/dist/types/lib/objects.d.ts +2 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -7488,7 +7488,6 @@ function getObjectListHeaderFirstLine(objectSchema, listViewName, ctx) {
|
|
|
7488
7488
|
"id": "u:ce9e3fcc411a"
|
|
7489
7489
|
}
|
|
7490
7490
|
],
|
|
7491
|
-
"className": "steedos-overflow-visible-dialog",
|
|
7492
7491
|
"showCloseButton": true,
|
|
7493
7492
|
"showErrorMsg": true,
|
|
7494
7493
|
"showLoading": true,
|
|
@@ -8478,7 +8477,6 @@ const getSetListviewFiltersButtonSchema = ()=>{
|
|
|
8478
8477
|
}
|
|
8479
8478
|
}
|
|
8480
8479
|
],
|
|
8481
|
-
"className": "steedos-overflow-visible-dialog",
|
|
8482
8480
|
"showCloseButton": true,
|
|
8483
8481
|
"showErrorMsg": true,
|
|
8484
8482
|
"showLoading": true,
|
|
@@ -10594,7 +10592,7 @@ async function getObjectRelatedListsMiniSchema(objectApiName){
|
|
|
10594
10592
|
* @Author: baozhoutao@steedos.com
|
|
10595
10593
|
* @Date: 2022-07-05 15:55:39
|
|
10596
10594
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
10597
|
-
* @LastEditTime: 2025-
|
|
10595
|
+
* @LastEditTime: 2025-06-17 20:18:18
|
|
10598
10596
|
* @Description:
|
|
10599
10597
|
*/
|
|
10600
10598
|
|
|
@@ -10950,12 +10948,13 @@ async function getListSchema(
|
|
|
10950
10948
|
"filtersFunction": listview_filters,
|
|
10951
10949
|
"sort": sort,
|
|
10952
10950
|
"ctx": ctx,
|
|
10953
|
-
"requestAdaptor":
|
|
10954
|
-
"adaptor":
|
|
10951
|
+
"requestAdaptor": ctx.requestAdaptor || listView.requestAdaptor,
|
|
10952
|
+
"adaptor": ctx.adaptor || listView.adaptor,
|
|
10955
10953
|
"headerToolbarItems": ctx.headerToolbarItems,
|
|
10956
10954
|
"filterVisible": ctx.filterVisible,
|
|
10957
10955
|
"rowClassNameExpr": ctx.rowClassNameExpr,
|
|
10958
|
-
"
|
|
10956
|
+
"crud": ctx.crud || listView.crud,
|
|
10957
|
+
"crudDataFilter": ctx.crudDataFilter || listView.crudDataFilter ,
|
|
10959
10958
|
"onCrudDataFilter": ctx.onCrudDataFilter
|
|
10960
10959
|
};
|
|
10961
10960
|
// console.log(`getListSchema===>`,amisSchema)
|
|
@@ -12564,7 +12563,9 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
12564
12563
|
{
|
|
12565
12564
|
"actionType": "custom",
|
|
12566
12565
|
"script": `
|
|
12567
|
-
|
|
12566
|
+
// lookup字段弹出列表,点击新建按钮,新建记录成功后,触发@data.changed.xxx,
|
|
12567
|
+
// 此时context.props.data值是lookup字段所在表单数据,经测试多层lookup弹出列表新建记录成功后context.props.data始终取的是最近一层的lookup字段所在表单数据,符合预期
|
|
12568
|
+
const masterRecord = context.props.data;//event.data._master && event.data._master.record;
|
|
12568
12569
|
const fieldConfig = ${JSON.stringify(field)};
|
|
12569
12570
|
let reference_to = fieldConfig.reference_to;
|
|
12570
12571
|
let saveValue;
|
|
@@ -12574,7 +12575,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
12574
12575
|
}
|
|
12575
12576
|
const saveField = fieldConfig.reference_to_field || '_id';
|
|
12576
12577
|
const saveFieldValue = newRecord[saveField];
|
|
12577
|
-
|
|
12578
12578
|
if( fieldConfig._reference_to && (_.isArray(fieldConfig._reference_to) || _.isFunction(fieldConfig._reference_to) || fieldConfig._reference_to.startsWith('function') ) ){
|
|
12579
12579
|
|
|
12580
12580
|
const fieldValue = masterRecord ? masterRecord[fieldConfig.name] : {o: reference_to, ids: []};
|
|
@@ -12594,8 +12594,10 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
12594
12594
|
|
|
12595
12595
|
}else{
|
|
12596
12596
|
if(fieldConfig.multiple){
|
|
12597
|
-
//
|
|
12598
|
-
|
|
12597
|
+
// const fieldValue = (masterRecord && masterRecord[fieldConfig.name]) || [];
|
|
12598
|
+
// 连续新建多个记录时,因为masterRecord获取的主记录不是实时的,所以只会勾选最后一个新建的记录
|
|
12599
|
+
// 而下面context.context.component指向的是lookup picker组件,可以直接取到用户实时勾选的记录。
|
|
12600
|
+
const fieldValue = context.context.component.props.store.toJSON().selectedItems
|
|
12599
12601
|
saveValue = fieldValue.concat(saveFieldValue);
|
|
12600
12602
|
}else{
|
|
12601
12603
|
saveValue = saveFieldValue;
|