@steedos-widgets/amis-lib 1.3.4-beta.12 → 1.3.4-beta.14

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
@@ -6344,7 +6344,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
6344
6344
  disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
6345
6345
  // labelField: labelField,
6346
6346
  // valueField: valueField,
6347
- source: apiInfo,
6347
+ // source: apiInfo,
6348
6348
  autoComplete: apiInfo,
6349
6349
  searchable: true,
6350
6350
  };
@@ -9857,7 +9857,7 @@ function deleteVariable(data, key) {
9857
9857
  * @Author: baozhoutao@steedos.com
9858
9858
  * @Date: 2022-05-26 16:02:08
9859
9859
  * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
9860
- * @LastEditTime: 2023-09-15 15:36:17
9860
+ * @LastEditTime: 2023-10-12 18:25:05
9861
9861
  * @Description:
9862
9862
  */
9863
9863
 
@@ -9877,8 +9877,9 @@ const getFieldSchemaArray = (formFields, ctx) => {
9877
9877
  }
9878
9878
 
9879
9879
  let forceHidden = false;
9880
- if(!recordId && field.readonly){
9880
+ if(!recordId && field.readonly && !ctx.isEditor){
9881
9881
  // 新建记录时,只读字段先隐藏,后续支持显示后,即任务:https://github.com/steedos/steedos-platform/issues/3164 完成后再放开
9882
+ // 表单只读时所有字段都是readonly,设计器中如果forceHidden会造成整个表单在只读的时候显示为空白了,所以要排除掉
9882
9883
  forceHidden = true;
9883
9884
  }
9884
9885
 
@@ -10470,7 +10471,11 @@ async function getObjectDetail(objectSchema, recordId, ctx){
10470
10471
  "formData": "$$"
10471
10472
  },
10472
10473
  wrapWithPanel: false,
10473
- body: await getFormBody(map(fields, (field)=>{field.readonly = true; return field;}), map(formFields, (field)=>{field.readonly = true; return field;}), Object.assign({}, ctx, {showSystemFields: true,fieldGroups: objectSchema.field_groups})),
10474
+ body: await getFormBody(
10475
+ map(fields, (field) => { field.readonly = true; return field; }),
10476
+ map(formFields, (field) => { field.readonly = true; return field; }),
10477
+ Object.assign({}, ctx, { showSystemFields: true, fieldGroups: objectSchema.field_groups })
10478
+ ),
10474
10479
  className: 'steedos-amis-form bg-white',
10475
10480
  actions: [], // 不显示表单默认的提交按钮
10476
10481
  onEvent: {