@steedos-widgets/amis-lib 3.6.2-beta.5 → 3.6.2-beta.6
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 +121 -147
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +121 -147
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +31 -34
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/api.d.ts +0 -4
- package/dist/types/lib/converter/amis/header.d.ts +0 -7
- package/dist/types/lib/converter/amis/index.d.ts +0 -17
- package/dist/types/lib/objects.d.ts +37 -41
- package/dist/types/lib/page_init.d.ts +1 -38
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1403,9 +1403,9 @@ var frontend_display_type_is_split = "分栏视图";
|
|
|
1403
1403
|
var frontend_display_as = "显示为";
|
|
1404
1404
|
var frontend_record_sum = "个项目";
|
|
1405
1405
|
var frontend_button_reload_tooltip = "刷新";
|
|
1406
|
-
var frontend_button_search_tooltip = "
|
|
1406
|
+
var frontend_button_search_tooltip = "搜索";
|
|
1407
1407
|
var frontend_fields_filter_button_search = "搜索";
|
|
1408
|
-
var frontend_fields_filter_button_settings = "
|
|
1408
|
+
var frontend_fields_filter_button_settings = "选择搜索项";
|
|
1409
1409
|
var frontend_button_listview_control_tooltip = "列表视图控制";
|
|
1410
1410
|
var frontend_button_listview_control_label = "列表视图控制";
|
|
1411
1411
|
var frontend_listview_control_columns = "显示的列";
|
|
@@ -2059,12 +2059,11 @@ async function getTableColumns(fields, options){
|
|
|
2059
2059
|
//增加quickEdit属性,实现快速编辑
|
|
2060
2060
|
const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
|
|
2061
2061
|
let className = "";
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
// }
|
|
2062
|
+
if(field.wrap != true){
|
|
2063
|
+
className += " whitespace-nowrap ";
|
|
2064
|
+
}else {
|
|
2065
|
+
className += " break-words ";
|
|
2066
|
+
}
|
|
2068
2067
|
let columnItem;
|
|
2069
2068
|
if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files'){
|
|
2070
2069
|
const previewFileScript = `
|
|
@@ -2596,7 +2595,7 @@ async function getTableSchema$1(fields, options){
|
|
|
2596
2595
|
}
|
|
2597
2596
|
return {
|
|
2598
2597
|
mode: "cards",
|
|
2599
|
-
perPageAvailable: [
|
|
2598
|
+
perPageAvailable: [20, 50, 100, 500],
|
|
2600
2599
|
name: "thelist",
|
|
2601
2600
|
headerToolbarClassName: "py-2 px-2 border-gray-300 border-solid border-b",
|
|
2602
2601
|
className: "",
|
|
@@ -2629,7 +2628,7 @@ async function getTableSchema$1(fields, options){
|
|
|
2629
2628
|
|
|
2630
2629
|
return {
|
|
2631
2630
|
mode: "table",
|
|
2632
|
-
perPageAvailable: [
|
|
2631
|
+
perPageAvailable: [20, 50, 100, 500],
|
|
2633
2632
|
name: "thelist",
|
|
2634
2633
|
headerToolbarClassName: "py-2 px-2 border-gray-300 border-solid border-b",
|
|
2635
2634
|
className: "",
|
|
@@ -3135,7 +3134,7 @@ function getReadonlyFormAdaptor(object, fields, options){
|
|
|
3135
3134
|
payload.data.__objectName = "${object.name}";
|
|
3136
3135
|
payload.data.record = record;
|
|
3137
3136
|
|
|
3138
|
-
payload.data.
|
|
3137
|
+
payload.data.NAME_FIELD_VALUE = record.${object.NAME_FIELD_KEY || 'name'};
|
|
3139
3138
|
payload.data._master = {
|
|
3140
3139
|
record: record,
|
|
3141
3140
|
objectName: "${object.name}",
|
|
@@ -3290,7 +3289,7 @@ async function getEditFormInitApi(object, recordId, fields, options){
|
|
|
3290
3289
|
cache: API_CACHE,
|
|
3291
3290
|
requestAdaptor: `
|
|
3292
3291
|
// 所有不想在network请求中发送的数据都应该从data中分离出来,data变量只需要留下query才需要发送出去
|
|
3293
|
-
var { recordId, objectName, uiSchema, global, context, ...data} = api.data;
|
|
3292
|
+
var { recordId, objectName, uiSchema, global, context, _master, ...data} = api.data;
|
|
3294
3293
|
if(!recordId){
|
|
3295
3294
|
// 新建则不请求任何数据
|
|
3296
3295
|
data.query = "{data:" + objectName + "(filters: " + JSON.stringify(["_id", "=", null]) + ", top: 1){_id}}";
|
|
@@ -3365,15 +3364,17 @@ async function getEditFormInitApi(object, recordId, fields, options){
|
|
|
3365
3364
|
}
|
|
3366
3365
|
// data下的变量需要在保存接口(getSaveApi)中被删除。
|
|
3367
3366
|
payload.data = {
|
|
3368
|
-
...initialValues
|
|
3367
|
+
...initialValues,
|
|
3368
|
+
editFormInited: true
|
|
3369
3369
|
}
|
|
3370
3370
|
${options.initApiAdaptor || ''}
|
|
3371
|
+
// console.log('getEditFormInitApi======>', payload);
|
|
3371
3372
|
return payload;
|
|
3372
3373
|
`,
|
|
3373
|
-
responseData: {
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
},
|
|
3374
|
+
// responseData: {
|
|
3375
|
+
// initialValues: "$$",
|
|
3376
|
+
// editFormInited: true
|
|
3377
|
+
// },
|
|
3377
3378
|
data: data,
|
|
3378
3379
|
headers: {
|
|
3379
3380
|
Authorization: "Bearer ${context.tenantId},${context.authToken}"
|
|
@@ -6663,8 +6664,7 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
|
|
|
6663
6664
|
},
|
|
6664
6665
|
{
|
|
6665
6666
|
"type": "tpl",
|
|
6666
|
-
"tpl": "${
|
|
6667
|
-
// "tpl": "${(record && uiSchema && record[uiSchema.NAME_FIELD_KEY]) || name}",
|
|
6667
|
+
"tpl": "${NAME_FIELD_VALUE}",
|
|
6668
6668
|
"inline": false,
|
|
6669
6669
|
"wrapperComponent": "",
|
|
6670
6670
|
"className": "record-detail-header-name leading-5 text-xl font-bold"
|
|
@@ -6751,7 +6751,6 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
|
|
|
6751
6751
|
type: 'service',
|
|
6752
6752
|
id: `page_readonly_${name}_header`,
|
|
6753
6753
|
name: `page`,
|
|
6754
|
-
data: { objectName: name, _id: recordId, recordPermissions: objectSchema.permissions, uiSchema: objectSchema, record: "${record}" },
|
|
6755
6754
|
body: body,
|
|
6756
6755
|
className: ''
|
|
6757
6756
|
}
|
|
@@ -7958,7 +7957,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
7958
7957
|
{
|
|
7959
7958
|
"type": "search-box",
|
|
7960
7959
|
"name": keywordsSearchBoxName,
|
|
7961
|
-
"placeholder": "
|
|
7960
|
+
"placeholder": "快捷搜索",
|
|
7962
7961
|
"value": crudKeywords,
|
|
7963
7962
|
// "clearable": true,//因为清除并不会触发失去焦点事件,只有禁用,但是它会触发change事件,所以等升级到amis 3.4+后可以重新放开
|
|
7964
7963
|
"clearAndSubmit": true,
|
|
@@ -8559,7 +8558,9 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
8559
8558
|
return payload;
|
|
8560
8559
|
`
|
|
8561
8560
|
},
|
|
8562
|
-
rowClassNameExpr
|
|
8561
|
+
// 外层data发生变化的时候, 不会重新渲染rowClassNameExpr, 所以先用css标记tr唯一标识
|
|
8562
|
+
// 使用表达式给tr添加初始选中状态
|
|
8563
|
+
rowClassNameExpr: options.rowClassNameExpr || "<%= data._id === data.recordId ? 'steedos-record-tr steedos-record-tr-' + data._id + ' steedos-record-selected' : 'steedos-record-tr steedos-record-tr-' + data._id %>"
|
|
8563
8564
|
}, bodyProps);
|
|
8564
8565
|
|
|
8565
8566
|
}
|
|
@@ -8574,7 +8575,7 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
8574
8575
|
|
|
8575
8576
|
if(body.columns && options.formFactor != 'SMALL'){
|
|
8576
8577
|
//将_display放入crud的columns的倒数第二列中(最后一列会影响固定列),可以通过setvalue修改行内数据域的_display,而不影响上层items的_display,用于批量编辑
|
|
8577
|
-
body.columns.splice(body.columns.length -1 , 0, {name: '_display',type: 'static', width: 1, placeholder: "",id: objectSchema.name + "_display_${_index}", tpl: "${}"});
|
|
8578
|
+
body.columns.splice(body.columns.length -1 , 0, {name: '_display',type: 'static', width: 1, placeholder: "",id: objectSchema.name + "_display_${_index}", tpl: "${''}"});
|
|
8578
8579
|
}
|
|
8579
8580
|
|
|
8580
8581
|
if (defaults) {
|
|
@@ -8709,9 +8710,7 @@ async function getObjectForm(objectSchema, ctx){
|
|
|
8709
8710
|
id: `service_${formSchema.id}`,
|
|
8710
8711
|
className: 'p-0',
|
|
8711
8712
|
name: `page_edit_${recordId}`,
|
|
8712
|
-
api: await getEditFormInitApi(objectSchema, recordId, fields, ctx),
|
|
8713
8713
|
data:{
|
|
8714
|
-
editFormInited: false,
|
|
8715
8714
|
...amisData
|
|
8716
8715
|
},
|
|
8717
8716
|
// data: {global: getGlobalData('edit'), recordId: recordId, objectName: objectSchema.name, context: {rootUrl: getRootUrl(), tenantId: getTenantId(), authToken: getAuthToken()}},
|
|
@@ -8720,8 +8719,9 @@ async function getObjectForm(objectSchema, ctx){
|
|
|
8720
8719
|
body: [defaultsDeep({}, formSchema, {
|
|
8721
8720
|
type: "form",
|
|
8722
8721
|
mode: layout,
|
|
8722
|
+
initApi: await getEditFormInitApi(objectSchema, recordId, fields, ctx),
|
|
8723
8723
|
data: {
|
|
8724
|
-
|
|
8724
|
+
editFormInited: false,
|
|
8725
8725
|
},
|
|
8726
8726
|
labelAlign,
|
|
8727
8727
|
persistData: false,
|
|
@@ -8735,11 +8735,15 @@ async function getObjectForm(objectSchema, ctx){
|
|
|
8735
8735
|
submitText: "", // amis 表单不显示提交按钮, 表单提交由项目代码接管
|
|
8736
8736
|
api: await getSaveApi(objectSchema, recordId, fields, ctx),
|
|
8737
8737
|
initFetch: recordId != 'new',
|
|
8738
|
-
body:
|
|
8738
|
+
body: {
|
|
8739
|
+
type: 'wrapper',
|
|
8740
|
+
className: 'p-0 m-0',
|
|
8741
|
+
body: await getFormBody(fields, formFields, Object.assign({}, ctx, {fieldGroups: objectSchema.field_groups})),
|
|
8742
|
+
hiddenOn: "${editFormInited != true}",
|
|
8743
|
+
},
|
|
8739
8744
|
panelClassName:'m-0 sm:rounded-lg shadow-none border-none',
|
|
8740
8745
|
bodyClassName: 'p-0',
|
|
8741
8746
|
className: 'steedos-amis-form',
|
|
8742
|
-
hiddenOn: "${editFormInited != true}",
|
|
8743
8747
|
onEvent: {
|
|
8744
8748
|
"submitSucc": {
|
|
8745
8749
|
"weight": 0,
|
|
@@ -9351,7 +9355,7 @@ async function getObjectRelatedListsMiniSchema(objectApiName){
|
|
|
9351
9355
|
* @Author: baozhoutao@steedos.com
|
|
9352
9356
|
* @Date: 2022-07-05 15:55:39
|
|
9353
9357
|
* @LastEditors: baozhoutao@steedos.com
|
|
9354
|
-
* @LastEditTime: 2024-01-
|
|
9358
|
+
* @LastEditTime: 2024-01-16 11:14:34
|
|
9355
9359
|
* @Description:
|
|
9356
9360
|
*/
|
|
9357
9361
|
|
|
@@ -9905,88 +9909,73 @@ async function getRecordDetailSchema(objectName, appId, props = {}){
|
|
|
9905
9909
|
}
|
|
9906
9910
|
}
|
|
9907
9911
|
|
|
9908
|
-
async function getRecordServiceSchema(objectName, appId, props = {}) {
|
|
9912
|
+
async function getRecordServiceSchema(objectName, appId, props = {}, body) {
|
|
9909
9913
|
const uiSchema = await getUISchema(objectName);
|
|
9910
9914
|
const fields = ___default.values(uiSchema.fields);
|
|
9915
|
+
const serviceId = `u:steedos-record-service-${objectName}`;
|
|
9911
9916
|
return {
|
|
9912
9917
|
uiSchema,
|
|
9913
9918
|
amisSchema: {
|
|
9914
|
-
|
|
9915
|
-
className:
|
|
9916
|
-
api: await getReadonlyFormInitApi(uiSchema, props.recordId, fields, props),
|
|
9917
|
-
"body": {
|
|
9918
|
-
"type": "wrapper",
|
|
9919
|
-
"className": "p-0 m-0",
|
|
9920
|
-
"body": [],
|
|
9921
|
-
"hiddenOn": "${recordLoaded != true}"
|
|
9922
|
-
},
|
|
9923
|
-
data: {
|
|
9924
|
-
"_master.objectName": "${objectName}",
|
|
9925
|
-
"_master.recordId": "${recordId}",
|
|
9926
|
-
...(props.data || {})
|
|
9927
|
-
},
|
|
9928
|
-
"style": {
|
|
9929
|
-
// "padding": "var(--Page-body-padding)",
|
|
9930
|
-
...props.style
|
|
9931
|
-
},
|
|
9919
|
+
type: 'service',
|
|
9920
|
+
className: "p-0 m-0",
|
|
9932
9921
|
onEvent: {
|
|
9933
9922
|
[`@data.changed.${objectName}`]: {
|
|
9934
|
-
"actions": [
|
|
9935
|
-
{
|
|
9936
|
-
"actionType": "reload",
|
|
9937
|
-
"expression": "this.__deletedRecord != true"
|
|
9938
|
-
},
|
|
9939
|
-
{
|
|
9940
|
-
"actionType": "custom",
|
|
9941
|
-
"script": "window.goBack()",
|
|
9942
|
-
"expression": "this.__deletedRecord === true"
|
|
9943
|
-
}
|
|
9944
|
-
]
|
|
9945
|
-
},
|
|
9946
|
-
// 如果定义了fetchInited,则无法接收到广播事件@data.changed
|
|
9947
|
-
// "fetchInited": {
|
|
9948
|
-
// "weight": 0,
|
|
9949
|
-
// "actions": [
|
|
9950
|
-
// // {
|
|
9951
|
-
// // actionType: 'broadcast',
|
|
9952
|
-
// // eventName: "recordLoaded",
|
|
9953
|
-
// // args: {
|
|
9954
|
-
// // eventName: "recordLoaded"
|
|
9955
|
-
// // },
|
|
9956
|
-
// // data: {
|
|
9957
|
-
// // objectName: "${event.data.__objectName}",
|
|
9958
|
-
// // record: "${event.data.__record}"
|
|
9959
|
-
// // },
|
|
9960
|
-
// // expression: "${event.data.__response.error != true}"
|
|
9961
|
-
// // },
|
|
9962
|
-
// {
|
|
9963
|
-
// "actionType": "setValue",
|
|
9964
|
-
// "args": {
|
|
9965
|
-
// value: {
|
|
9966
|
-
// "recordLoaded": true,
|
|
9967
|
-
// }
|
|
9968
|
-
// },
|
|
9969
|
-
// expression: "${event.data.__response.error != true}"
|
|
9970
|
-
// }
|
|
9971
|
-
// ]
|
|
9972
|
-
// },
|
|
9973
|
-
"recordLoaded": {
|
|
9974
9923
|
"actions": [
|
|
9975
9924
|
{
|
|
9976
9925
|
"actionType": "reload",
|
|
9977
|
-
"
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9926
|
+
"componentId": serviceId,
|
|
9927
|
+
"expression": "this.__deletedRecord != true"
|
|
9928
|
+
},
|
|
9929
|
+
{
|
|
9930
|
+
"actionType": "custom",
|
|
9931
|
+
"script": "window.goBack()",
|
|
9932
|
+
"expression": "this.__deletedRecord === true"
|
|
9984
9933
|
}
|
|
9985
9934
|
]
|
|
9986
9935
|
},
|
|
9987
|
-
|
|
9936
|
+
},
|
|
9937
|
+
body: {
|
|
9938
|
+
"type": "service",
|
|
9939
|
+
id: serviceId,
|
|
9940
|
+
className: 'steedos-record-service p-0 md:p-2',
|
|
9941
|
+
api: await getReadonlyFormInitApi(uiSchema, props.recordId, fields, props),
|
|
9942
|
+
body: {
|
|
9943
|
+
"type": "wrapper",
|
|
9944
|
+
"className": "p-0 m-0",
|
|
9945
|
+
"body": body || [],
|
|
9946
|
+
"hiddenOn": "${recordLoaded != true}"
|
|
9947
|
+
},
|
|
9948
|
+
data: {
|
|
9949
|
+
"_master.objectName": "${objectName}",
|
|
9950
|
+
"_master.recordId": "${recordId}",
|
|
9951
|
+
...(props.data || {})
|
|
9952
|
+
},
|
|
9953
|
+
"style": {
|
|
9954
|
+
// "padding": "var(--Page-body-padding)",
|
|
9955
|
+
...props.style
|
|
9956
|
+
},
|
|
9957
|
+
onEvent: {
|
|
9958
|
+
// 如果定义了fetchInited,则无法接收到广播事件@data.changed
|
|
9959
|
+
"fetchInited": {
|
|
9960
|
+
"weight": 0,
|
|
9961
|
+
"actions": [
|
|
9962
|
+
{
|
|
9963
|
+
actionType: 'broadcast',
|
|
9964
|
+
eventName: "recordLoaded",
|
|
9965
|
+
data: {
|
|
9966
|
+
objectName: "${event.data.__objectName}",
|
|
9967
|
+
record: "${event.data.record}"
|
|
9968
|
+
},
|
|
9969
|
+
expression: "${event.data.__response.error != true}"
|
|
9970
|
+
},
|
|
9971
|
+
]
|
|
9972
|
+
},
|
|
9973
|
+
...props.onEvent
|
|
9974
|
+
}
|
|
9988
9975
|
}
|
|
9989
9976
|
}
|
|
9977
|
+
|
|
9978
|
+
|
|
9990
9979
|
}
|
|
9991
9980
|
}
|
|
9992
9981
|
|
|
@@ -12882,7 +12871,7 @@ async function getFormBody(permissionFields, formFields, ctx){
|
|
|
12882
12871
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
12883
12872
|
* @Date: 2023-11-15 09:50:22
|
|
12884
12873
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
12885
|
-
* @LastEditTime: 2024-01-
|
|
12874
|
+
* @LastEditTime: 2024-01-16 14:58:51
|
|
12886
12875
|
*/
|
|
12887
12876
|
|
|
12888
12877
|
/**
|
|
@@ -13819,38 +13808,44 @@ const getAmisInputTableSchema = async (props) => {
|
|
|
13819
13808
|
if (!props.primaryKey) {
|
|
13820
13809
|
props.primaryKey = "_id";
|
|
13821
13810
|
}
|
|
13811
|
+
let showOperation = props.showOperation;
|
|
13812
|
+
if(showOperation !== false){
|
|
13813
|
+
showOperation = true;
|
|
13814
|
+
}
|
|
13822
13815
|
let serviceId = getComponentId("table_service", props.id);
|
|
13823
13816
|
let buttonsForColumnOperations = [];
|
|
13824
13817
|
let inlineEditMode = props.inlineEditMode;
|
|
13825
13818
|
let showAsInlineEditMode = inlineEditMode && props.editable;
|
|
13826
|
-
if
|
|
13827
|
-
|
|
13828
|
-
|
|
13829
|
-
|
|
13830
|
-
|
|
13831
|
-
|
|
13832
|
-
|
|
13833
|
-
|
|
13834
|
-
|
|
13835
|
-
|
|
13836
|
-
|
|
13837
|
-
|
|
13819
|
+
if(showOperation){
|
|
13820
|
+
if (props.editable) {
|
|
13821
|
+
let showEditButton = true;
|
|
13822
|
+
if (showAsInlineEditMode) {
|
|
13823
|
+
// 始终显示弹出子表表单按钮,如果需要判断只在有列被隐藏时才需要显示弹出表单按钮放开下面的if逻辑就好
|
|
13824
|
+
showEditButton = true;
|
|
13825
|
+
// // inline edit模式下只在有列被隐藏时才需要显示编辑按钮
|
|
13826
|
+
// if (props.columns && props.columns.length > 0 && props.columns.length < props.fields.length) {
|
|
13827
|
+
// showEditButton = true;
|
|
13828
|
+
// }
|
|
13829
|
+
// else {
|
|
13830
|
+
// showEditButton = false;
|
|
13831
|
+
// }
|
|
13832
|
+
}
|
|
13833
|
+
// 编辑时显示编辑按钮
|
|
13834
|
+
if (showEditButton) {
|
|
13835
|
+
let buttonEditSchema = await getButtonEdit(props, showAsInlineEditMode);
|
|
13836
|
+
buttonsForColumnOperations.push(buttonEditSchema);
|
|
13837
|
+
}
|
|
13838
13838
|
}
|
|
13839
|
-
|
|
13840
|
-
|
|
13841
|
-
|
|
13842
|
-
|
|
13839
|
+
else {
|
|
13840
|
+
// 只读时显示查看按钮
|
|
13841
|
+
// 如果想只在有列被隐藏时才需要显示查看按钮可以加上判断:if (props.columns && props.columns.length > 0 && props.columns.length < props.fields.length)
|
|
13842
|
+
let buttonViewSchema = await getButtonView(props);
|
|
13843
|
+
buttonsForColumnOperations.push(buttonViewSchema);
|
|
13844
|
+
}
|
|
13845
|
+
if (props.removable) {
|
|
13846
|
+
let buttonDeleteSchema = await getButtonDelete(props);
|
|
13847
|
+
buttonsForColumnOperations.push(buttonDeleteSchema);
|
|
13843
13848
|
}
|
|
13844
|
-
}
|
|
13845
|
-
else {
|
|
13846
|
-
// 只读时显示查看按钮
|
|
13847
|
-
// 如果想只在有列被隐藏时才需要显示查看按钮可以加上判断:if (props.columns && props.columns.length > 0 && props.columns.length < props.fields.length)
|
|
13848
|
-
let buttonViewSchema = await getButtonView(props);
|
|
13849
|
-
buttonsForColumnOperations.push(buttonViewSchema);
|
|
13850
|
-
}
|
|
13851
|
-
if (props.removable) {
|
|
13852
|
-
let buttonDeleteSchema = await getButtonDelete(props);
|
|
13853
|
-
buttonsForColumnOperations.push(buttonDeleteSchema);
|
|
13854
13849
|
}
|
|
13855
13850
|
let inputTableSchema = {
|
|
13856
13851
|
"type": "input-table",
|
|
@@ -13898,7 +13893,7 @@ const getAmisInputTableSchema = async (props) => {
|
|
|
13898
13893
|
return item.depend_on;
|
|
13899
13894
|
});
|
|
13900
13895
|
if (isAnyFieldHasDependOn) {
|
|
13901
|
-
// 有任意一个子字段有depend_on
|
|
13896
|
+
// 有任意一个子字段有depend_on属性时,强制设置禁用静态模式,因为strictMode模式下,dependOn的字段值变更后,不会rerender整个子表
|
|
13902
13897
|
Object.assign(inputTableSchema, {
|
|
13903
13898
|
strictMode: false
|
|
13904
13899
|
});
|
|
@@ -14003,7 +13998,7 @@ async function getListPageInitSchema(objectApiName, formFactor, userSession) {
|
|
|
14003
13998
|
// 获取
|
|
14004
13999
|
async function getRecordPageInitSchema(objectApiName){
|
|
14005
14000
|
const relatedList = await getObjectRelatedList(objectApiName);
|
|
14006
|
-
|
|
14001
|
+
await getUISchema(objectApiName);
|
|
14007
14002
|
let body = [
|
|
14008
14003
|
// detailHeaderAmisSchema,
|
|
14009
14004
|
{
|
|
@@ -14011,28 +14006,7 @@ async function getRecordPageInitSchema(objectApiName){
|
|
|
14011
14006
|
"label": "标题面板",
|
|
14012
14007
|
"objectApiName": "${objectName}",
|
|
14013
14008
|
"recordId": "${recordId}",
|
|
14014
|
-
"onEvent": {
|
|
14015
|
-
"recordLoaded": {
|
|
14016
|
-
"actions": [
|
|
14017
|
-
{
|
|
14018
|
-
"actionType": "setValue",
|
|
14019
|
-
"args": {
|
|
14020
|
-
"value": {
|
|
14021
|
-
"recordLoaded": true,
|
|
14022
|
-
}
|
|
14023
|
-
}
|
|
14024
|
-
},
|
|
14025
|
-
{
|
|
14026
|
-
"actionType": "reload",
|
|
14027
|
-
"data": {
|
|
14028
|
-
"name": `\${record.${uiSchema?.NAME_FIELD_KEY || 'name'}}`,
|
|
14029
|
-
"record": `\${record}`,
|
|
14030
|
-
"recordLoaded": true,
|
|
14031
|
-
}
|
|
14032
|
-
}
|
|
14033
|
-
]
|
|
14034
|
-
}
|
|
14035
|
-
}
|
|
14009
|
+
"onEvent": {}
|
|
14036
14010
|
}
|
|
14037
14011
|
];
|
|
14038
14012
|
let contentBody = {
|