@steedos-widgets/amis-object 6.3.6 → 6.3.7
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 -6
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.js +14 -6
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.js +11 -11
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +21 -21
- package/package.json +3 -3
package/dist/amis-object.cjs.js
CHANGED
|
@@ -4395,7 +4395,7 @@ async function getLookupLinkOnClick$1(field, options) {
|
|
|
4395
4395
|
const recordPage = await getPage({ type: 'record', appId: options.appId, objectName: options.objectName, formFactor: options.formFactor });
|
|
4396
4396
|
|
|
4397
4397
|
const drawerRecordDetailSchema = recordPage ? Object.assign({}, recordPage.schema, {
|
|
4398
|
-
"recordId":
|
|
4398
|
+
"recordId": field.type == "file" ? "${value}":`\${${field.name}}`,
|
|
4399
4399
|
"data": {
|
|
4400
4400
|
...recordPage.schema.data,
|
|
4401
4401
|
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
@@ -4405,7 +4405,7 @@ async function getLookupLinkOnClick$1(field, options) {
|
|
|
4405
4405
|
}) : {
|
|
4406
4406
|
"type": "steedos-record-detail",
|
|
4407
4407
|
"objectApiName": options.objectName,
|
|
4408
|
-
"recordId":
|
|
4408
|
+
"recordId": field.type == "file" ? "${value}":`\${${field.name}}`,
|
|
4409
4409
|
"showBackButton": false,
|
|
4410
4410
|
"showButtons": true,
|
|
4411
4411
|
"data": {
|
|
@@ -4501,17 +4501,18 @@ const getAmisFileReadonlySchema = async (steedosField,ctx = {})=>{
|
|
|
4501
4501
|
// <a href='<%= item.url %>' target='_self' class='block'><%= item.name %></a>
|
|
4502
4502
|
// <% });} %>`
|
|
4503
4503
|
"type": "control",
|
|
4504
|
+
"name": "",//control若存在name,内部each组件的source则会获取不到内容
|
|
4504
4505
|
"body": {
|
|
4505
4506
|
type: 'each',
|
|
4506
4507
|
placeholder: "",
|
|
4507
|
-
|
|
4508
|
+
className: steedosField.multiple ? `flex flex-col` : '',
|
|
4508
4509
|
source: `\${_display.${steedosField.name}|asArray}`,
|
|
4509
4510
|
items: {
|
|
4510
4511
|
type: 'static',
|
|
4511
4512
|
labelClassName: "hidden",
|
|
4512
4513
|
label: false,
|
|
4513
4514
|
className: 'm-0',
|
|
4514
|
-
tpl: `<a href="/app/-/cfs_files_filerecord/view/\${
|
|
4515
|
+
tpl: `<a href="/app/-/cfs_files_filerecord/view/\${value}" ${lookupATagClick}>\${name}</a>`,
|
|
4515
4516
|
// tpl: "<%= item.name >",
|
|
4516
4517
|
// onEvent: window.innerWidth < 768 ? null : REFERENCE_VALUE_ITEM_ONCLICK
|
|
4517
4518
|
onEvent: window.innerWidth < 768 ? null : await getLookupLinkOnClick$1(steedosField, {
|
|
@@ -5163,6 +5164,8 @@ async function getQuickEditSchema(object, columnField, options){
|
|
|
5163
5164
|
_display["${field.name}"].push({
|
|
5164
5165
|
"name": event.data.result.name,
|
|
5165
5166
|
"url": event.data.result.url,
|
|
5167
|
+
"value": event.data.result.value,
|
|
5168
|
+
"_id": event.data.result.value,
|
|
5166
5169
|
"type": event.data.item.type,
|
|
5167
5170
|
"size": event.data.item.size
|
|
5168
5171
|
});
|
|
@@ -5175,6 +5178,8 @@ async function getQuickEditSchema(object, columnField, options){
|
|
|
5175
5178
|
_display["${field.name}"] = {
|
|
5176
5179
|
"name": event.data.result.name,
|
|
5177
5180
|
"url": event.data.result.url,
|
|
5181
|
+
"value": event.data.result.value,
|
|
5182
|
+
"_id": event.data.result.value,
|
|
5178
5183
|
"type": event.data.item.type,
|
|
5179
5184
|
"size": event.data.item.size
|
|
5180
5185
|
};
|
|
@@ -5620,7 +5625,7 @@ async function getTableColumns$1(object, fields, options){
|
|
|
5620
5625
|
static: true,
|
|
5621
5626
|
className,
|
|
5622
5627
|
...await getAmisFileReadonlySchema(field)
|
|
5623
|
-
}, fieldAmis
|
|
5628
|
+
}, fieldAmis);
|
|
5624
5629
|
}
|
|
5625
5630
|
else if(field.type === 'select'){
|
|
5626
5631
|
const map = getSelectMap(field.options);
|
|
@@ -6431,7 +6436,8 @@ async function getTableApi(mainObject, fields, options){
|
|
|
6431
6436
|
// PC客户端附件子表列表点击标题预览附件功能依赖了_id,所以这里拼出来
|
|
6432
6437
|
let itemKeyValue = item[key];
|
|
6433
6438
|
item[key] = value.map(function(item, index){
|
|
6434
|
-
item._id = itemKeyValue[index];
|
|
6439
|
+
item._id = typeof itemKeyValue == 'string' ? itemKeyValue : itemKeyValue[index];
|
|
6440
|
+
item.value = typeof itemKeyValue == 'string' ? itemKeyValue : itemKeyValue[index];
|
|
6435
6441
|
return item;
|
|
6436
6442
|
});
|
|
6437
6443
|
}else{
|
|
@@ -6784,6 +6790,7 @@ function getScriptForRewriteValueForFileFields(fields){
|
|
|
6784
6790
|
if(fileFields[item].multiple){
|
|
6785
6791
|
if(fileFieldDisplayValue instanceof Array){
|
|
6786
6792
|
data[item] = fileFieldDisplayValue.map((item, index)=>{
|
|
6793
|
+
item.value = fileFieldValue[index];
|
|
6787
6794
|
return {
|
|
6788
6795
|
value: fileFieldValue[index],
|
|
6789
6796
|
name: item.name,
|
|
@@ -6793,6 +6800,7 @@ function getScriptForRewriteValueForFileFields(fields){
|
|
|
6793
6800
|
});
|
|
6794
6801
|
}
|
|
6795
6802
|
}else{
|
|
6803
|
+
fileFieldDisplayValue.value = fileFieldValue;
|
|
6796
6804
|
data[item] = [{
|
|
6797
6805
|
value: fileFieldValue,
|
|
6798
6806
|
name: fileFieldDisplayValue.name,
|