@steedos-widgets/amis-object 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/amis-object.cjs.js +12 -10
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.js +12 -10
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.js +5 -5
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +19 -19
- package/package.json +3 -3
package/dist/amis-object.cjs.js
CHANGED
|
@@ -10693,7 +10693,6 @@ function getObjectListHeaderFirstLine(objectSchema, listViewName, ctx) {
|
|
|
10693
10693
|
"id": "u:ce9e3fcc411a"
|
|
10694
10694
|
}
|
|
10695
10695
|
],
|
|
10696
|
-
"className": "steedos-overflow-visible-dialog",
|
|
10697
10696
|
"showCloseButton": true,
|
|
10698
10697
|
"showErrorMsg": true,
|
|
10699
10698
|
"showLoading": true,
|
|
@@ -11683,7 +11682,6 @@ const getSetListviewFiltersButtonSchema = ()=>{
|
|
|
11683
11682
|
}
|
|
11684
11683
|
}
|
|
11685
11684
|
],
|
|
11686
|
-
"className": "steedos-overflow-visible-dialog",
|
|
11687
11685
|
"showCloseButton": true,
|
|
11688
11686
|
"showErrorMsg": true,
|
|
11689
11687
|
"showLoading": true,
|
|
@@ -13799,7 +13797,7 @@ async function getObjectRelatedListsMiniSchema(objectApiName){
|
|
|
13799
13797
|
* @Author: baozhoutao@steedos.com
|
|
13800
13798
|
* @Date: 2022-07-05 15:55:39
|
|
13801
13799
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
13802
|
-
* @LastEditTime: 2025-
|
|
13800
|
+
* @LastEditTime: 2025-06-17 20:18:18
|
|
13803
13801
|
* @Description:
|
|
13804
13802
|
*/
|
|
13805
13803
|
|
|
@@ -14155,12 +14153,13 @@ async function getListSchema(
|
|
|
14155
14153
|
"filtersFunction": listview_filters,
|
|
14156
14154
|
"sort": sort,
|
|
14157
14155
|
"ctx": ctx,
|
|
14158
|
-
"requestAdaptor":
|
|
14159
|
-
"adaptor":
|
|
14156
|
+
"requestAdaptor": ctx.requestAdaptor || listView.requestAdaptor,
|
|
14157
|
+
"adaptor": ctx.adaptor || listView.adaptor,
|
|
14160
14158
|
"headerToolbarItems": ctx.headerToolbarItems,
|
|
14161
14159
|
"filterVisible": ctx.filterVisible,
|
|
14162
14160
|
"rowClassNameExpr": ctx.rowClassNameExpr,
|
|
14163
|
-
"
|
|
14161
|
+
"crud": ctx.crud || listView.crud,
|
|
14162
|
+
"crudDataFilter": ctx.crudDataFilter || listView.crudDataFilter ,
|
|
14164
14163
|
"onCrudDataFilter": ctx.onCrudDataFilter
|
|
14165
14164
|
};
|
|
14166
14165
|
// console.log(`getListSchema===>`,amisSchema)
|
|
@@ -15769,7 +15768,9 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
15769
15768
|
{
|
|
15770
15769
|
"actionType": "custom",
|
|
15771
15770
|
"script": `
|
|
15772
|
-
|
|
15771
|
+
// lookup字段弹出列表,点击新建按钮,新建记录成功后,触发@data.changed.xxx,
|
|
15772
|
+
// 此时context.props.data值是lookup字段所在表单数据,经测试多层lookup弹出列表新建记录成功后context.props.data始终取的是最近一层的lookup字段所在表单数据,符合预期
|
|
15773
|
+
const masterRecord = context.props.data;//event.data._master && event.data._master.record;
|
|
15773
15774
|
const fieldConfig = ${JSON.stringify(field)};
|
|
15774
15775
|
let reference_to = fieldConfig.reference_to;
|
|
15775
15776
|
let saveValue;
|
|
@@ -15779,7 +15780,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
15779
15780
|
}
|
|
15780
15781
|
const saveField = fieldConfig.reference_to_field || '_id';
|
|
15781
15782
|
const saveFieldValue = newRecord[saveField];
|
|
15782
|
-
|
|
15783
15783
|
if( fieldConfig._reference_to && (_.isArray(fieldConfig._reference_to) || _.isFunction(fieldConfig._reference_to) || fieldConfig._reference_to.startsWith('function') ) ){
|
|
15784
15784
|
|
|
15785
15785
|
const fieldValue = masterRecord ? masterRecord[fieldConfig.name] : {o: reference_to, ids: []};
|
|
@@ -15799,8 +15799,10 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
15799
15799
|
|
|
15800
15800
|
}else{
|
|
15801
15801
|
if(fieldConfig.multiple){
|
|
15802
|
-
//
|
|
15803
|
-
|
|
15802
|
+
// const fieldValue = (masterRecord && masterRecord[fieldConfig.name]) || [];
|
|
15803
|
+
// 连续新建多个记录时,因为masterRecord获取的主记录不是实时的,所以只会勾选最后一个新建的记录
|
|
15804
|
+
// 而下面context.context.component指向的是lookup picker组件,可以直接取到用户实时勾选的记录。
|
|
15805
|
+
const fieldValue = context.context.component.props.store.toJSON().selectedItems
|
|
15804
15806
|
saveValue = fieldValue.concat(saveFieldValue);
|
|
15805
15807
|
}else{
|
|
15806
15808
|
saveValue = saveFieldValue;
|