@steedos-widgets/amis-object 3.6.12 → 3.6.13
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.esm.js
CHANGED
|
@@ -5324,7 +5324,7 @@ async function getTableColumns$1(object, fields, options){
|
|
|
5324
5324
|
var file_id = data.versions && data.versions[0] && data.versions[0]._id;
|
|
5325
5325
|
window.previewFile && window.previewFile({file_name, file_id});
|
|
5326
5326
|
`;
|
|
5327
|
-
columnItem = {
|
|
5327
|
+
columnItem = Object.assign({}, {
|
|
5328
5328
|
"type": "button",
|
|
5329
5329
|
"label": `<%=data.versions ? data.name : "${field.label}"%>`,
|
|
5330
5330
|
className,
|
|
@@ -5356,7 +5356,7 @@ async function getTableColumns$1(object, fields, options){
|
|
|
5356
5356
|
]
|
|
5357
5357
|
}
|
|
5358
5358
|
}
|
|
5359
|
-
};
|
|
5359
|
+
}, fieldAmis);
|
|
5360
5360
|
}else if(field.type === 'toggle'){
|
|
5361
5361
|
columnItem = Object.assign({}, {
|
|
5362
5362
|
type: "switch",
|
|
@@ -14989,7 +14989,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
14989
14989
|
var optionsFilters = [["${valueFieldKey}", optionsFiltersOp, []]];
|
|
14990
14990
|
if (defaultValue && !api.data.$term) {
|
|
14991
14991
|
const defaultValueOptionsQueryData = ${JSON.stringify(defaultValueOptionsQueryData)};
|
|
14992
|
-
const defaultValueOptionsQuery = defaultValueOptionsQueryData
|
|
14992
|
+
const defaultValueOptionsQuery = defaultValueOptionsQueryData && defaultValueOptionsQueryData.query && defaultValueOptionsQueryData.query.replace(/^{/,"").replace(/}$/,"");
|
|
14993
14993
|
// 字段值单独请求,没值的时候在请求中返回空
|
|
14994
14994
|
optionsFilters = [["${valueFieldKey}", optionsFiltersOp, defaultValue]];
|
|
14995
14995
|
if(filters.length > 0){
|