@steedos-widgets/amis-lib 1.3.4-beta.12 → 1.3.4-beta.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/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +8 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +3 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -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-
|
|
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(
|
|
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: {
|