@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.cjs.js
CHANGED
|
@@ -1430,9 +1430,9 @@ var frontend_display_type_is_split = "分栏视图";
|
|
|
1430
1430
|
var frontend_display_as = "显示为";
|
|
1431
1431
|
var frontend_record_sum = "个项目";
|
|
1432
1432
|
var frontend_button_reload_tooltip = "刷新";
|
|
1433
|
-
var frontend_button_search_tooltip = "
|
|
1433
|
+
var frontend_button_search_tooltip = "搜索";
|
|
1434
1434
|
var frontend_fields_filter_button_search = "搜索";
|
|
1435
|
-
var frontend_fields_filter_button_settings = "
|
|
1435
|
+
var frontend_fields_filter_button_settings = "选择搜索项";
|
|
1436
1436
|
var frontend_button_listview_control_tooltip = "列表视图控制";
|
|
1437
1437
|
var frontend_button_listview_control_label = "列表视图控制";
|
|
1438
1438
|
var frontend_listview_control_columns = "显示的列";
|
|
@@ -2086,12 +2086,11 @@ async function getTableColumns(fields, options){
|
|
|
2086
2086
|
//增加quickEdit属性,实现快速编辑
|
|
2087
2087
|
const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
|
|
2088
2088
|
let className = "";
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
// }
|
|
2089
|
+
if(field.wrap != true){
|
|
2090
|
+
className += " whitespace-nowrap ";
|
|
2091
|
+
}else {
|
|
2092
|
+
className += " break-words ";
|
|
2093
|
+
}
|
|
2095
2094
|
let columnItem;
|
|
2096
2095
|
if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files'){
|
|
2097
2096
|
const previewFileScript = `
|
|
@@ -2623,7 +2622,7 @@ async function getTableSchema$1(fields, options){
|
|
|
2623
2622
|
}
|
|
2624
2623
|
return {
|
|
2625
2624
|
mode: "cards",
|
|
2626
|
-
perPageAvailable: [
|
|
2625
|
+
perPageAvailable: [20, 50, 100, 500],
|
|
2627
2626
|
name: "thelist",
|
|
2628
2627
|
headerToolbarClassName: "py-2 px-2 border-gray-300 border-solid border-b",
|
|
2629
2628
|
className: "",
|
|
@@ -2656,7 +2655,7 @@ async function getTableSchema$1(fields, options){
|
|
|
2656
2655
|
|
|
2657
2656
|
return {
|
|
2658
2657
|
mode: "table",
|
|
2659
|
-
perPageAvailable: [
|
|
2658
|
+
perPageAvailable: [20, 50, 100, 500],
|
|
2660
2659
|
name: "thelist",
|
|
2661
2660
|
headerToolbarClassName: "py-2 px-2 border-gray-300 border-solid border-b",
|
|
2662
2661
|
className: "",
|
|
@@ -3162,7 +3161,7 @@ function getReadonlyFormAdaptor(object, fields, options){
|
|
|
3162
3161
|
payload.data.__objectName = "${object.name}";
|
|
3163
3162
|
payload.data.record = record;
|
|
3164
3163
|
|
|
3165
|
-
payload.data.
|
|
3164
|
+
payload.data.NAME_FIELD_VALUE = record.${object.NAME_FIELD_KEY || 'name'};
|
|
3166
3165
|
payload.data._master = {
|
|
3167
3166
|
record: record,
|
|
3168
3167
|
objectName: "${object.name}",
|
|
@@ -3317,7 +3316,7 @@ async function getEditFormInitApi(object, recordId, fields, options){
|
|
|
3317
3316
|
cache: API_CACHE,
|
|
3318
3317
|
requestAdaptor: `
|
|
3319
3318
|
// 所有不想在network请求中发送的数据都应该从data中分离出来,data变量只需要留下query才需要发送出去
|
|
3320
|
-
var { recordId, objectName, uiSchema, global, context, ...data} = api.data;
|
|
3319
|
+
var { recordId, objectName, uiSchema, global, context, _master, ...data} = api.data;
|
|
3321
3320
|
if(!recordId){
|
|
3322
3321
|
// 新建则不请求任何数据
|
|
3323
3322
|
data.query = "{data:" + objectName + "(filters: " + JSON.stringify(["_id", "=", null]) + ", top: 1){_id}}";
|
|
@@ -3392,15 +3391,17 @@ async function getEditFormInitApi(object, recordId, fields, options){
|
|
|
3392
3391
|
}
|
|
3393
3392
|
// data下的变量需要在保存接口(getSaveApi)中被删除。
|
|
3394
3393
|
payload.data = {
|
|
3395
|
-
...initialValues
|
|
3394
|
+
...initialValues,
|
|
3395
|
+
editFormInited: true
|
|
3396
3396
|
}
|
|
3397
3397
|
${options.initApiAdaptor || ''}
|
|
3398
|
+
// console.log('getEditFormInitApi======>', payload);
|
|
3398
3399
|
return payload;
|
|
3399
3400
|
`,
|
|
3400
|
-
responseData: {
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
},
|
|
3401
|
+
// responseData: {
|
|
3402
|
+
// initialValues: "$$",
|
|
3403
|
+
// editFormInited: true
|
|
3404
|
+
// },
|
|
3404
3405
|
data: data,
|
|
3405
3406
|
headers: {
|
|
3406
3407
|
Authorization: "Bearer ${context.tenantId},${context.authToken}"
|
|
@@ -6690,8 +6691,7 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
|
|
|
6690
6691
|
},
|
|
6691
6692
|
{
|
|
6692
6693
|
"type": "tpl",
|
|
6693
|
-
"tpl": "${
|
|
6694
|
-
// "tpl": "${(record && uiSchema && record[uiSchema.NAME_FIELD_KEY]) || name}",
|
|
6694
|
+
"tpl": "${NAME_FIELD_VALUE}",
|
|
6695
6695
|
"inline": false,
|
|
6696
6696
|
"wrapperComponent": "",
|
|
6697
6697
|
"className": "record-detail-header-name leading-5 text-xl font-bold"
|
|
@@ -6778,7 +6778,6 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
|
|
|
6778
6778
|
type: 'service',
|
|
6779
6779
|
id: `page_readonly_${name}_header`,
|
|
6780
6780
|
name: `page`,
|
|
6781
|
-
data: { objectName: name, _id: recordId, recordPermissions: objectSchema.permissions, uiSchema: objectSchema, record: "${record}" },
|
|
6782
6781
|
body: body,
|
|
6783
6782
|
className: ''
|
|
6784
6783
|
}
|
|
@@ -7985,7 +7984,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
7985
7984
|
{
|
|
7986
7985
|
"type": "search-box",
|
|
7987
7986
|
"name": keywordsSearchBoxName,
|
|
7988
|
-
"placeholder": "
|
|
7987
|
+
"placeholder": "快捷搜索",
|
|
7989
7988
|
"value": crudKeywords,
|
|
7990
7989
|
// "clearable": true,//因为清除并不会触发失去焦点事件,只有禁用,但是它会触发change事件,所以等升级到amis 3.4+后可以重新放开
|
|
7991
7990
|
"clearAndSubmit": true,
|
|
@@ -8586,7 +8585,9 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
8586
8585
|
return payload;
|
|
8587
8586
|
`
|
|
8588
8587
|
},
|
|
8589
|
-
rowClassNameExpr
|
|
8588
|
+
// 外层data发生变化的时候, 不会重新渲染rowClassNameExpr, 所以先用css标记tr唯一标识
|
|
8589
|
+
// 使用表达式给tr添加初始选中状态
|
|
8590
|
+
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 %>"
|
|
8590
8591
|
}, bodyProps);
|
|
8591
8592
|
|
|
8592
8593
|
}
|
|
@@ -8601,7 +8602,7 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
8601
8602
|
|
|
8602
8603
|
if(body.columns && options.formFactor != 'SMALL'){
|
|
8603
8604
|
//将_display放入crud的columns的倒数第二列中(最后一列会影响固定列),可以通过setvalue修改行内数据域的_display,而不影响上层items的_display,用于批量编辑
|
|
8604
|
-
body.columns.splice(body.columns.length -1 , 0, {name: '_display',type: 'static', width: 1, placeholder: "",id: objectSchema.name + "_display_${_index}", tpl: "${}"});
|
|
8605
|
+
body.columns.splice(body.columns.length -1 , 0, {name: '_display',type: 'static', width: 1, placeholder: "",id: objectSchema.name + "_display_${_index}", tpl: "${''}"});
|
|
8605
8606
|
}
|
|
8606
8607
|
|
|
8607
8608
|
if (defaults) {
|
|
@@ -8736,9 +8737,7 @@ async function getObjectForm(objectSchema, ctx){
|
|
|
8736
8737
|
id: `service_${formSchema.id}`,
|
|
8737
8738
|
className: 'p-0',
|
|
8738
8739
|
name: `page_edit_${recordId}`,
|
|
8739
|
-
api: await getEditFormInitApi(objectSchema, recordId, fields, ctx),
|
|
8740
8740
|
data:{
|
|
8741
|
-
editFormInited: false,
|
|
8742
8741
|
...amisData
|
|
8743
8742
|
},
|
|
8744
8743
|
// data: {global: getGlobalData('edit'), recordId: recordId, objectName: objectSchema.name, context: {rootUrl: getRootUrl(), tenantId: getTenantId(), authToken: getAuthToken()}},
|
|
@@ -8747,8 +8746,9 @@ async function getObjectForm(objectSchema, ctx){
|
|
|
8747
8746
|
body: [defaultsDeep({}, formSchema, {
|
|
8748
8747
|
type: "form",
|
|
8749
8748
|
mode: layout,
|
|
8749
|
+
initApi: await getEditFormInitApi(objectSchema, recordId, fields, ctx),
|
|
8750
8750
|
data: {
|
|
8751
|
-
|
|
8751
|
+
editFormInited: false,
|
|
8752
8752
|
},
|
|
8753
8753
|
labelAlign,
|
|
8754
8754
|
persistData: false,
|
|
@@ -8762,11 +8762,15 @@ async function getObjectForm(objectSchema, ctx){
|
|
|
8762
8762
|
submitText: "", // amis 表单不显示提交按钮, 表单提交由项目代码接管
|
|
8763
8763
|
api: await getSaveApi(objectSchema, recordId, fields, ctx),
|
|
8764
8764
|
initFetch: recordId != 'new',
|
|
8765
|
-
body:
|
|
8765
|
+
body: {
|
|
8766
|
+
type: 'wrapper',
|
|
8767
|
+
className: 'p-0 m-0',
|
|
8768
|
+
body: await getFormBody(fields, formFields, Object.assign({}, ctx, {fieldGroups: objectSchema.field_groups})),
|
|
8769
|
+
hiddenOn: "${editFormInited != true}",
|
|
8770
|
+
},
|
|
8766
8771
|
panelClassName:'m-0 sm:rounded-lg shadow-none border-none',
|
|
8767
8772
|
bodyClassName: 'p-0',
|
|
8768
8773
|
className: 'steedos-amis-form',
|
|
8769
|
-
hiddenOn: "${editFormInited != true}",
|
|
8770
8774
|
onEvent: {
|
|
8771
8775
|
"submitSucc": {
|
|
8772
8776
|
"weight": 0,
|
|
@@ -9378,7 +9382,7 @@ async function getObjectRelatedListsMiniSchema(objectApiName){
|
|
|
9378
9382
|
* @Author: baozhoutao@steedos.com
|
|
9379
9383
|
* @Date: 2022-07-05 15:55:39
|
|
9380
9384
|
* @LastEditors: baozhoutao@steedos.com
|
|
9381
|
-
* @LastEditTime: 2024-01-
|
|
9385
|
+
* @LastEditTime: 2024-01-16 11:14:34
|
|
9382
9386
|
* @Description:
|
|
9383
9387
|
*/
|
|
9384
9388
|
|
|
@@ -9932,88 +9936,73 @@ async function getRecordDetailSchema(objectName, appId, props = {}){
|
|
|
9932
9936
|
}
|
|
9933
9937
|
}
|
|
9934
9938
|
|
|
9935
|
-
async function getRecordServiceSchema(objectName, appId, props = {}) {
|
|
9939
|
+
async function getRecordServiceSchema(objectName, appId, props = {}, body) {
|
|
9936
9940
|
const uiSchema = await getUISchema(objectName);
|
|
9937
9941
|
const fields = ___default["default"].values(uiSchema.fields);
|
|
9942
|
+
const serviceId = `u:steedos-record-service-${objectName}`;
|
|
9938
9943
|
return {
|
|
9939
9944
|
uiSchema,
|
|
9940
9945
|
amisSchema: {
|
|
9941
|
-
|
|
9942
|
-
className:
|
|
9943
|
-
api: await getReadonlyFormInitApi(uiSchema, props.recordId, fields, props),
|
|
9944
|
-
"body": {
|
|
9945
|
-
"type": "wrapper",
|
|
9946
|
-
"className": "p-0 m-0",
|
|
9947
|
-
"body": [],
|
|
9948
|
-
"hiddenOn": "${recordLoaded != true}"
|
|
9949
|
-
},
|
|
9950
|
-
data: {
|
|
9951
|
-
"_master.objectName": "${objectName}",
|
|
9952
|
-
"_master.recordId": "${recordId}",
|
|
9953
|
-
...(props.data || {})
|
|
9954
|
-
},
|
|
9955
|
-
"style": {
|
|
9956
|
-
// "padding": "var(--Page-body-padding)",
|
|
9957
|
-
...props.style
|
|
9958
|
-
},
|
|
9946
|
+
type: 'service',
|
|
9947
|
+
className: "p-0 m-0",
|
|
9959
9948
|
onEvent: {
|
|
9960
9949
|
[`@data.changed.${objectName}`]: {
|
|
9961
|
-
"actions": [
|
|
9962
|
-
{
|
|
9963
|
-
"actionType": "reload",
|
|
9964
|
-
"expression": "this.__deletedRecord != true"
|
|
9965
|
-
},
|
|
9966
|
-
{
|
|
9967
|
-
"actionType": "custom",
|
|
9968
|
-
"script": "window.goBack()",
|
|
9969
|
-
"expression": "this.__deletedRecord === true"
|
|
9970
|
-
}
|
|
9971
|
-
]
|
|
9972
|
-
},
|
|
9973
|
-
// 如果定义了fetchInited,则无法接收到广播事件@data.changed
|
|
9974
|
-
// "fetchInited": {
|
|
9975
|
-
// "weight": 0,
|
|
9976
|
-
// "actions": [
|
|
9977
|
-
// // {
|
|
9978
|
-
// // actionType: 'broadcast',
|
|
9979
|
-
// // eventName: "recordLoaded",
|
|
9980
|
-
// // args: {
|
|
9981
|
-
// // eventName: "recordLoaded"
|
|
9982
|
-
// // },
|
|
9983
|
-
// // data: {
|
|
9984
|
-
// // objectName: "${event.data.__objectName}",
|
|
9985
|
-
// // record: "${event.data.__record}"
|
|
9986
|
-
// // },
|
|
9987
|
-
// // expression: "${event.data.__response.error != true}"
|
|
9988
|
-
// // },
|
|
9989
|
-
// {
|
|
9990
|
-
// "actionType": "setValue",
|
|
9991
|
-
// "args": {
|
|
9992
|
-
// value: {
|
|
9993
|
-
// "recordLoaded": true,
|
|
9994
|
-
// }
|
|
9995
|
-
// },
|
|
9996
|
-
// expression: "${event.data.__response.error != true}"
|
|
9997
|
-
// }
|
|
9998
|
-
// ]
|
|
9999
|
-
// },
|
|
10000
|
-
"recordLoaded": {
|
|
10001
9950
|
"actions": [
|
|
10002
9951
|
{
|
|
10003
9952
|
"actionType": "reload",
|
|
10004
|
-
"
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
9953
|
+
"componentId": serviceId,
|
|
9954
|
+
"expression": "this.__deletedRecord != true"
|
|
9955
|
+
},
|
|
9956
|
+
{
|
|
9957
|
+
"actionType": "custom",
|
|
9958
|
+
"script": "window.goBack()",
|
|
9959
|
+
"expression": "this.__deletedRecord === true"
|
|
10011
9960
|
}
|
|
10012
9961
|
]
|
|
10013
9962
|
},
|
|
10014
|
-
|
|
9963
|
+
},
|
|
9964
|
+
body: {
|
|
9965
|
+
"type": "service",
|
|
9966
|
+
id: serviceId,
|
|
9967
|
+
className: 'steedos-record-service p-0 md:p-2',
|
|
9968
|
+
api: await getReadonlyFormInitApi(uiSchema, props.recordId, fields, props),
|
|
9969
|
+
body: {
|
|
9970
|
+
"type": "wrapper",
|
|
9971
|
+
"className": "p-0 m-0",
|
|
9972
|
+
"body": body || [],
|
|
9973
|
+
"hiddenOn": "${recordLoaded != true}"
|
|
9974
|
+
},
|
|
9975
|
+
data: {
|
|
9976
|
+
"_master.objectName": "${objectName}",
|
|
9977
|
+
"_master.recordId": "${recordId}",
|
|
9978
|
+
...(props.data || {})
|
|
9979
|
+
},
|
|
9980
|
+
"style": {
|
|
9981
|
+
// "padding": "var(--Page-body-padding)",
|
|
9982
|
+
...props.style
|
|
9983
|
+
},
|
|
9984
|
+
onEvent: {
|
|
9985
|
+
// 如果定义了fetchInited,则无法接收到广播事件@data.changed
|
|
9986
|
+
"fetchInited": {
|
|
9987
|
+
"weight": 0,
|
|
9988
|
+
"actions": [
|
|
9989
|
+
{
|
|
9990
|
+
actionType: 'broadcast',
|
|
9991
|
+
eventName: "recordLoaded",
|
|
9992
|
+
data: {
|
|
9993
|
+
objectName: "${event.data.__objectName}",
|
|
9994
|
+
record: "${event.data.record}"
|
|
9995
|
+
},
|
|
9996
|
+
expression: "${event.data.__response.error != true}"
|
|
9997
|
+
},
|
|
9998
|
+
]
|
|
9999
|
+
},
|
|
10000
|
+
...props.onEvent
|
|
10001
|
+
}
|
|
10015
10002
|
}
|
|
10016
10003
|
}
|
|
10004
|
+
|
|
10005
|
+
|
|
10017
10006
|
}
|
|
10018
10007
|
}
|
|
10019
10008
|
|
|
@@ -12909,7 +12898,7 @@ async function getFormBody(permissionFields, formFields, ctx){
|
|
|
12909
12898
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
12910
12899
|
* @Date: 2023-11-15 09:50:22
|
|
12911
12900
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
12912
|
-
* @LastEditTime: 2024-01-
|
|
12901
|
+
* @LastEditTime: 2024-01-16 14:58:51
|
|
12913
12902
|
*/
|
|
12914
12903
|
|
|
12915
12904
|
/**
|
|
@@ -13846,38 +13835,44 @@ const getAmisInputTableSchema = async (props) => {
|
|
|
13846
13835
|
if (!props.primaryKey) {
|
|
13847
13836
|
props.primaryKey = "_id";
|
|
13848
13837
|
}
|
|
13838
|
+
let showOperation = props.showOperation;
|
|
13839
|
+
if(showOperation !== false){
|
|
13840
|
+
showOperation = true;
|
|
13841
|
+
}
|
|
13849
13842
|
let serviceId = getComponentId("table_service", props.id);
|
|
13850
13843
|
let buttonsForColumnOperations = [];
|
|
13851
13844
|
let inlineEditMode = props.inlineEditMode;
|
|
13852
13845
|
let showAsInlineEditMode = inlineEditMode && props.editable;
|
|
13853
|
-
if
|
|
13854
|
-
|
|
13855
|
-
|
|
13856
|
-
|
|
13857
|
-
|
|
13858
|
-
|
|
13859
|
-
|
|
13860
|
-
|
|
13861
|
-
|
|
13862
|
-
|
|
13863
|
-
|
|
13864
|
-
|
|
13846
|
+
if(showOperation){
|
|
13847
|
+
if (props.editable) {
|
|
13848
|
+
let showEditButton = true;
|
|
13849
|
+
if (showAsInlineEditMode) {
|
|
13850
|
+
// 始终显示弹出子表表单按钮,如果需要判断只在有列被隐藏时才需要显示弹出表单按钮放开下面的if逻辑就好
|
|
13851
|
+
showEditButton = true;
|
|
13852
|
+
// // inline edit模式下只在有列被隐藏时才需要显示编辑按钮
|
|
13853
|
+
// if (props.columns && props.columns.length > 0 && props.columns.length < props.fields.length) {
|
|
13854
|
+
// showEditButton = true;
|
|
13855
|
+
// }
|
|
13856
|
+
// else {
|
|
13857
|
+
// showEditButton = false;
|
|
13858
|
+
// }
|
|
13859
|
+
}
|
|
13860
|
+
// 编辑时显示编辑按钮
|
|
13861
|
+
if (showEditButton) {
|
|
13862
|
+
let buttonEditSchema = await getButtonEdit(props, showAsInlineEditMode);
|
|
13863
|
+
buttonsForColumnOperations.push(buttonEditSchema);
|
|
13864
|
+
}
|
|
13865
13865
|
}
|
|
13866
|
-
|
|
13867
|
-
|
|
13868
|
-
|
|
13869
|
-
|
|
13866
|
+
else {
|
|
13867
|
+
// 只读时显示查看按钮
|
|
13868
|
+
// 如果想只在有列被隐藏时才需要显示查看按钮可以加上判断:if (props.columns && props.columns.length > 0 && props.columns.length < props.fields.length)
|
|
13869
|
+
let buttonViewSchema = await getButtonView(props);
|
|
13870
|
+
buttonsForColumnOperations.push(buttonViewSchema);
|
|
13871
|
+
}
|
|
13872
|
+
if (props.removable) {
|
|
13873
|
+
let buttonDeleteSchema = await getButtonDelete(props);
|
|
13874
|
+
buttonsForColumnOperations.push(buttonDeleteSchema);
|
|
13870
13875
|
}
|
|
13871
|
-
}
|
|
13872
|
-
else {
|
|
13873
|
-
// 只读时显示查看按钮
|
|
13874
|
-
// 如果想只在有列被隐藏时才需要显示查看按钮可以加上判断:if (props.columns && props.columns.length > 0 && props.columns.length < props.fields.length)
|
|
13875
|
-
let buttonViewSchema = await getButtonView(props);
|
|
13876
|
-
buttonsForColumnOperations.push(buttonViewSchema);
|
|
13877
|
-
}
|
|
13878
|
-
if (props.removable) {
|
|
13879
|
-
let buttonDeleteSchema = await getButtonDelete(props);
|
|
13880
|
-
buttonsForColumnOperations.push(buttonDeleteSchema);
|
|
13881
13876
|
}
|
|
13882
13877
|
let inputTableSchema = {
|
|
13883
13878
|
"type": "input-table",
|
|
@@ -13925,7 +13920,7 @@ const getAmisInputTableSchema = async (props) => {
|
|
|
13925
13920
|
return item.depend_on;
|
|
13926
13921
|
});
|
|
13927
13922
|
if (isAnyFieldHasDependOn) {
|
|
13928
|
-
// 有任意一个子字段有depend_on
|
|
13923
|
+
// 有任意一个子字段有depend_on属性时,强制设置禁用静态模式,因为strictMode模式下,dependOn的字段值变更后,不会rerender整个子表
|
|
13929
13924
|
Object.assign(inputTableSchema, {
|
|
13930
13925
|
strictMode: false
|
|
13931
13926
|
});
|
|
@@ -14030,7 +14025,7 @@ async function getListPageInitSchema(objectApiName, formFactor, userSession) {
|
|
|
14030
14025
|
// 获取
|
|
14031
14026
|
async function getRecordPageInitSchema(objectApiName){
|
|
14032
14027
|
const relatedList = await getObjectRelatedList(objectApiName);
|
|
14033
|
-
|
|
14028
|
+
await getUISchema(objectApiName);
|
|
14034
14029
|
let body = [
|
|
14035
14030
|
// detailHeaderAmisSchema,
|
|
14036
14031
|
{
|
|
@@ -14038,28 +14033,7 @@ async function getRecordPageInitSchema(objectApiName){
|
|
|
14038
14033
|
"label": "标题面板",
|
|
14039
14034
|
"objectApiName": "${objectName}",
|
|
14040
14035
|
"recordId": "${recordId}",
|
|
14041
|
-
"onEvent": {
|
|
14042
|
-
"recordLoaded": {
|
|
14043
|
-
"actions": [
|
|
14044
|
-
{
|
|
14045
|
-
"actionType": "setValue",
|
|
14046
|
-
"args": {
|
|
14047
|
-
"value": {
|
|
14048
|
-
"recordLoaded": true,
|
|
14049
|
-
}
|
|
14050
|
-
}
|
|
14051
|
-
},
|
|
14052
|
-
{
|
|
14053
|
-
"actionType": "reload",
|
|
14054
|
-
"data": {
|
|
14055
|
-
"name": `\${record.${uiSchema?.NAME_FIELD_KEY || 'name'}}`,
|
|
14056
|
-
"record": `\${record}`,
|
|
14057
|
-
"recordLoaded": true,
|
|
14058
|
-
}
|
|
14059
|
-
}
|
|
14060
|
-
]
|
|
14061
|
-
}
|
|
14062
|
-
}
|
|
14036
|
+
"onEvent": {}
|
|
14063
14037
|
}
|
|
14064
14038
|
];
|
|
14065
14039
|
let contentBody = {
|