@steedos-widgets/amis-object 6.10.1-beta.14 → 6.10.1-beta.16

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.
@@ -15,6 +15,7 @@ export declare const AmisRecordDetailMini: (props: any) => Promise<{
15
15
  headers: {
16
16
  Authorization: string;
17
17
  };
18
+ trackExpression: string;
18
19
  };
19
20
  body: {
20
21
  type: string;
@@ -37,6 +37,7 @@ export declare const AmisRecordService: (props: any) => Promise<{
37
37
  headers: {
38
38
  Authorization: string;
39
39
  };
40
+ trackExpression: string;
40
41
  };
41
42
  body: {
42
43
  type: string;
@@ -6715,8 +6715,8 @@ function getReadonlyFormAdaptor(object, fields, options){
6715
6715
  else{
6716
6716
  console.log('无法找到记录', api, payload, context)
6717
6717
  return {
6718
- status: 2,
6719
- msg: "${instance.t('frontend_no_records_found')}"
6718
+ status: 0,
6719
+ // msg: "${instance.t('frontend_no_records_found')}"
6720
6720
  }
6721
6721
  }
6722
6722
  }
@@ -6781,7 +6781,8 @@ async function getReadonlyFormInitApi(object, recordId, fields, options){
6781
6781
  data: await getFindOneQuery$1(object, recordId, fields, findOneOptions),
6782
6782
  headers: {
6783
6783
  Authorization: "Bearer ${context.tenantId},${context.authToken}"
6784
- }
6784
+ },
6785
+ trackExpression: '${objectName}'
6785
6786
  }
6786
6787
  }
6787
6788
 
@@ -22118,16 +22119,22 @@ var AmisObjectButton = function (props) {
22118
22119
  }
22119
22120
  }, [objectName, name]);
22120
22121
  var buttonClick = function () {
22121
- return executeButton(button, {
22122
- objectName: objectName,
22123
- listViewId: listViewId || data.listViewId,
22124
- uiSchema: uiSchema,
22125
- record: data,
22126
- recordId: data._id,
22127
- appId: appId,
22128
- formFactor: formFactor,
22129
- scope: data._scoped
22130
- });
22122
+ try {
22123
+ return executeButton(button, {
22124
+ objectName: objectName,
22125
+ listViewId: listViewId || data.listViewId,
22126
+ uiSchema: uiSchema,
22127
+ record: data,
22128
+ recordId: data._id,
22129
+ appId: appId,
22130
+ formFactor: formFactor,
22131
+ scope: data._scoped
22132
+ });
22133
+ }
22134
+ catch (error) {
22135
+ console.error(error);
22136
+ SteedosUI.notification.error({ message: error.message });
22137
+ }
22131
22138
  };
22132
22139
  if (!button) {
22133
22140
  return (React__default["default"].createElement(React__default["default"].Fragment, null,