@steedos-widgets/amis-object 1.2.36 → 1.2.37
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 +14 -15
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.js +15 -16
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.js +14 -15
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +16 -16
- package/package.json +3 -3
package/dist/amis-object.cjs.js
CHANGED
|
@@ -3854,7 +3854,7 @@ async function getFieldsTemplate(fields, display){
|
|
|
3854
3854
|
if(displayFields.length > 0){
|
|
3855
3855
|
return `${fieldsName.join(',')},${expandFieldsQuery},_display:_ui{${displayFields.join(',')}}`;
|
|
3856
3856
|
}
|
|
3857
|
-
return `${fieldsName.join(' ')},${expandFieldsQuery}
|
|
3857
|
+
return ___default.trimEnd(`${fieldsName.join(' ')},${expandFieldsQuery}`, ",")
|
|
3858
3858
|
}
|
|
3859
3859
|
|
|
3860
3860
|
function getRecordPermissionsTemplate(){
|
|
@@ -6523,8 +6523,8 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
6523
6523
|
}
|
|
6524
6524
|
if(!event.data.isLookup){
|
|
6525
6525
|
// 刷新浏览器后,filterFormValues值是空的,只能从本地存储中取出并重置为空值
|
|
6526
|
-
const
|
|
6527
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
6526
|
+
const listName = event.data.listName;
|
|
6527
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
6528
6528
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
6529
6529
|
if(localListViewProps){
|
|
6530
6530
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -6550,13 +6550,13 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
6550
6550
|
const dataProviderInited = `
|
|
6551
6551
|
const objectName = data.objectName;
|
|
6552
6552
|
const isLookup = data.isLookup;
|
|
6553
|
-
const
|
|
6553
|
+
const listName = data.listName;
|
|
6554
6554
|
let searchableFieldsStoreKey = location.pathname + "/searchable_fields/";
|
|
6555
6555
|
if(isLookup){
|
|
6556
6556
|
searchableFieldsStoreKey += "lookup/" + objectName;
|
|
6557
6557
|
}
|
|
6558
6558
|
else{
|
|
6559
|
-
searchableFieldsStoreKey += (
|
|
6559
|
+
searchableFieldsStoreKey += (listName || "");
|
|
6560
6560
|
}
|
|
6561
6561
|
let defaultSearchableFields = sessionStorage.getItem(searchableFieldsStoreKey);
|
|
6562
6562
|
if(defaultSearchableFields){
|
|
@@ -6583,7 +6583,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
6583
6583
|
setData({ showFieldsFilter: false });
|
|
6584
6584
|
}
|
|
6585
6585
|
else{
|
|
6586
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
6586
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
6587
6587
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
6588
6588
|
if(localListViewProps){
|
|
6589
6589
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -6613,7 +6613,6 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
6613
6613
|
const listName = data.listName;
|
|
6614
6614
|
const objectName = data.objectName;
|
|
6615
6615
|
const isLookup = data.isLookup;
|
|
6616
|
-
const listViewId = data.listViewId;
|
|
6617
6616
|
const value = data.fields;
|
|
6618
6617
|
const scope = event.context.scoped;
|
|
6619
6618
|
// 这里的filterForm不是name为"listview-filter-form"的内部form,而是crud自带的filter form
|
|
@@ -6629,7 +6628,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
6629
6628
|
searchableFieldsStoreKey += "lookup/" + objectName;
|
|
6630
6629
|
}
|
|
6631
6630
|
else{
|
|
6632
|
-
searchableFieldsStoreKey += (
|
|
6631
|
+
searchableFieldsStoreKey += (listName || "");
|
|
6633
6632
|
}
|
|
6634
6633
|
sessionStorage.setItem(searchableFieldsStoreKey, value);
|
|
6635
6634
|
|
|
@@ -6687,7 +6686,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
6687
6686
|
}
|
|
6688
6687
|
|
|
6689
6688
|
// 列表视图crud支持本地缓存,所以需要进一步清除浏览器本地缓存里面用户在可搜索项中移除的字段值
|
|
6690
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
6689
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
6691
6690
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
6692
6691
|
if(localListViewProps){
|
|
6693
6692
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -11429,8 +11428,8 @@ async function getTableApi(mainObject, fields, options){
|
|
|
11429
11428
|
const data = _.cloneDeep(api.data);
|
|
11430
11429
|
try{
|
|
11431
11430
|
// TODO: 不应该直接在这里取localStorage,应该从外面传入
|
|
11432
|
-
const
|
|
11433
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
11431
|
+
const listName = api.data.listName;
|
|
11432
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
11434
11433
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
11435
11434
|
if(localListViewProps){
|
|
11436
11435
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -11630,8 +11629,8 @@ async function getTableApi(mainObject, fields, options){
|
|
|
11630
11629
|
|
|
11631
11630
|
try{
|
|
11632
11631
|
// TODO: 不应该直接在这里取localStorage,应该从外面传入
|
|
11633
|
-
const
|
|
11634
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
11632
|
+
const listName = api.body.listName;
|
|
11633
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
11635
11634
|
/**
|
|
11636
11635
|
* localListViewProps规范来自crud请求api中api.data.$self参数值的。
|
|
11637
11636
|
* 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
|
|
@@ -13600,7 +13599,7 @@ async function getRelatedListSchema(
|
|
|
13600
13599
|
* @Author: baozhoutao@steedos.com
|
|
13601
13600
|
* @Date: 2022-07-05 15:55:39
|
|
13602
13601
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
13603
|
-
* @LastEditTime: 2023-08-
|
|
13602
|
+
* @LastEditTime: 2023-08-04 12:27:48
|
|
13604
13603
|
* @Description:
|
|
13605
13604
|
*/
|
|
13606
13605
|
|
|
@@ -13865,7 +13864,7 @@ async function getListSchema(
|
|
|
13865
13864
|
* 本次存储代码段
|
|
13866
13865
|
*/
|
|
13867
13866
|
try {
|
|
13868
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
13867
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listViewName || "");
|
|
13869
13868
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
13870
13869
|
/**
|
|
13871
13870
|
* localListViewProps规范来自crud请求api中api.data.$self参数值的。
|