@steedos-widgets/amis-lib 1.1.10 → 1.1.12-beta.1

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/index.esm.js CHANGED
@@ -6447,13 +6447,17 @@ async function getTableApi(mainObject, fields, options){
6447
6447
  let valueField = mainObject.key_field || '_id';
6448
6448
  const api = await getApi(mainObject, null, fields, {count: options.queryCount, alias: 'rows', limit: top, queryOptions: `filters: {__filters}, top: {__top}, skip: {__skip}, sort: "{__sort}"`});
6449
6449
  api.data.$term = "$term";
6450
+ api.data.term = "$term";
6450
6451
  api.data.$self = "$$";
6452
+ api.data.self = "$$";
6451
6453
  api.data.filter = "$filter";
6452
6454
  api.data.loaded = "${loaded}";
6453
6455
  api.data.listViewId = "${listViewId}";
6454
6456
  api.requestAdaptor = `
6455
6457
  // selfData 中的数据由 CRUD 控制. selfData中,只能获取到 CRUD 给定的data. 无法从数据链中获取数据.
6456
6458
  let selfData = JSON.parse(JSON.stringify(api.data.$self));
6459
+ // 保留一份初始data,以供自定义发送适配器中获取原始数据。
6460
+ const data = _.cloneDeep(api.data);
6457
6461
  try{
6458
6462
  // TODO: 不应该直接在这里取localStorage,应该从外面传入
6459
6463
  const listViewId = api.data.listViewId;
@@ -7327,7 +7331,7 @@ const getRecordPermissions = async (objectName, recordId)=>{
7327
7331
  * @Author: baozhoutao@steedos.com
7328
7332
  * @Date: 2022-07-05 15:55:39
7329
7333
  * @LastEditors: Please set LastEditors
7330
- * @LastEditTime: 2023-03-30 17:44:53
7334
+ * @LastEditTime: 2023-04-13 09:20:21
7331
7335
  * @Description:
7332
7336
  */
7333
7337
 
@@ -7658,6 +7662,8 @@ async function getRelatedListSchema(
7658
7662
  "filters": listviewFilter,
7659
7663
  "filtersFunction": filtersFunction,
7660
7664
  "sort": listViewSort,
7665
+ "requestAdaptor": ctx.requestAdaptor,
7666
+ "adaptor": ctx.adaptor,
7661
7667
  "ctx": ctx
7662
7668
  };
7663
7669
  // console.log(`getRelatedListSchema amisSchema`, amisSchema);