@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.esm.js
CHANGED
|
@@ -4367,7 +4367,7 @@ async function getLookupLinkOnClick$1(field, options) {
|
|
|
4367
4367
|
const recordPage = await getPage({ type: 'record', appId: options.appId, objectName: options.objectName, formFactor: options.formFactor });
|
|
4368
4368
|
|
|
4369
4369
|
const drawerRecordDetailSchema = recordPage ? Object.assign({}, recordPage.schema, {
|
|
4370
|
-
"recordId":
|
|
4370
|
+
"recordId": field.type == "file" ? "${value}":`\${${field.name}}`,
|
|
4371
4371
|
"data": {
|
|
4372
4372
|
...recordPage.schema.data,
|
|
4373
4373
|
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
@@ -4377,7 +4377,7 @@ async function getLookupLinkOnClick$1(field, options) {
|
|
|
4377
4377
|
}) : {
|
|
4378
4378
|
"type": "steedos-record-detail",
|
|
4379
4379
|
"objectApiName": options.objectName,
|
|
4380
|
-
"recordId":
|
|
4380
|
+
"recordId": field.type == "file" ? "${value}":`\${${field.name}}`,
|
|
4381
4381
|
"showBackButton": false,
|
|
4382
4382
|
"showButtons": true,
|
|
4383
4383
|
"data": {
|
|
@@ -4473,17 +4473,18 @@ const getAmisFileReadonlySchema = async (steedosField,ctx = {})=>{
|
|
|
4473
4473
|
// <a href='<%= item.url %>' target='_self' class='block'><%= item.name %></a>
|
|
4474
4474
|
// <% });} %>`
|
|
4475
4475
|
"type": "control",
|
|
4476
|
+
"name": "",//control若存在name,内部each组件的source则会获取不到内容
|
|
4476
4477
|
"body": {
|
|
4477
4478
|
type: 'each',
|
|
4478
4479
|
placeholder: "",
|
|
4479
|
-
|
|
4480
|
+
className: steedosField.multiple ? `flex flex-col` : '',
|
|
4480
4481
|
source: `\${_display.${steedosField.name}|asArray}`,
|
|
4481
4482
|
items: {
|
|
4482
4483
|
type: 'static',
|
|
4483
4484
|
labelClassName: "hidden",
|
|
4484
4485
|
label: false,
|
|
4485
4486
|
className: 'm-0',
|
|
4486
|
-
tpl: `<a href="/app/-/cfs_files_filerecord/view/\${
|
|
4487
|
+
tpl: `<a href="/app/-/cfs_files_filerecord/view/\${value}" ${lookupATagClick}>\${name}</a>`,
|
|
4487
4488
|
// tpl: "<%= item.name >",
|
|
4488
4489
|
// onEvent: window.innerWidth < 768 ? null : REFERENCE_VALUE_ITEM_ONCLICK
|
|
4489
4490
|
onEvent: window.innerWidth < 768 ? null : await getLookupLinkOnClick$1(steedosField, {
|
|
@@ -5135,6 +5136,8 @@ async function getQuickEditSchema(object, columnField, options){
|
|
|
5135
5136
|
_display["${field.name}"].push({
|
|
5136
5137
|
"name": event.data.result.name,
|
|
5137
5138
|
"url": event.data.result.url,
|
|
5139
|
+
"value": event.data.result.value,
|
|
5140
|
+
"_id": event.data.result.value,
|
|
5138
5141
|
"type": event.data.item.type,
|
|
5139
5142
|
"size": event.data.item.size
|
|
5140
5143
|
});
|
|
@@ -5147,6 +5150,8 @@ async function getQuickEditSchema(object, columnField, options){
|
|
|
5147
5150
|
_display["${field.name}"] = {
|
|
5148
5151
|
"name": event.data.result.name,
|
|
5149
5152
|
"url": event.data.result.url,
|
|
5153
|
+
"value": event.data.result.value,
|
|
5154
|
+
"_id": event.data.result.value,
|
|
5150
5155
|
"type": event.data.item.type,
|
|
5151
5156
|
"size": event.data.item.size
|
|
5152
5157
|
};
|
|
@@ -5592,7 +5597,7 @@ async function getTableColumns$1(object, fields, options){
|
|
|
5592
5597
|
static: true,
|
|
5593
5598
|
className,
|
|
5594
5599
|
...await getAmisFileReadonlySchema(field)
|
|
5595
|
-
}, fieldAmis
|
|
5600
|
+
}, fieldAmis);
|
|
5596
5601
|
}
|
|
5597
5602
|
else if(field.type === 'select'){
|
|
5598
5603
|
const map = getSelectMap(field.options);
|
|
@@ -6403,7 +6408,8 @@ async function getTableApi(mainObject, fields, options){
|
|
|
6403
6408
|
// PC客户端附件子表列表点击标题预览附件功能依赖了_id,所以这里拼出来
|
|
6404
6409
|
let itemKeyValue = item[key];
|
|
6405
6410
|
item[key] = value.map(function(item, index){
|
|
6406
|
-
item._id = itemKeyValue[index];
|
|
6411
|
+
item._id = typeof itemKeyValue == 'string' ? itemKeyValue : itemKeyValue[index];
|
|
6412
|
+
item.value = typeof itemKeyValue == 'string' ? itemKeyValue : itemKeyValue[index];
|
|
6407
6413
|
return item;
|
|
6408
6414
|
});
|
|
6409
6415
|
}else{
|
|
@@ -6756,6 +6762,7 @@ function getScriptForRewriteValueForFileFields(fields){
|
|
|
6756
6762
|
if(fileFields[item].multiple){
|
|
6757
6763
|
if(fileFieldDisplayValue instanceof Array){
|
|
6758
6764
|
data[item] = fileFieldDisplayValue.map((item, index)=>{
|
|
6765
|
+
item.value = fileFieldValue[index];
|
|
6759
6766
|
return {
|
|
6760
6767
|
value: fileFieldValue[index],
|
|
6761
6768
|
name: item.name,
|
|
@@ -6765,6 +6772,7 @@ function getScriptForRewriteValueForFileFields(fields){
|
|
|
6765
6772
|
});
|
|
6766
6773
|
}
|
|
6767
6774
|
}else{
|
|
6775
|
+
fileFieldDisplayValue.value = fileFieldValue;
|
|
6768
6776
|
data[item] = [{
|
|
6769
6777
|
value: fileFieldValue,
|
|
6770
6778
|
name: fileFieldDisplayValue.name,
|