docs: 修复一处表单二开的错误

This commit is contained in:
gaoyunqi
2024-06-11 16:05:28 +08:00
parent 519bfc9a9e
commit 1e4b1c3452

View File

@ -69,15 +69,20 @@ export default {
mixins: [SimpleFormSetup],
setup(props, ctx) {
const ret = SimpleForm.setup(props, ctx);
const schemaMap = {};
ret.getSchemas._value.forEach((schema) => {
schemaMap[schema.key] = schema;
});
return {
schemaMap,
...ret
};
},
computed: {
// 这里需要增加一个计算属性 否则流程关联时字段读写状态会失效
schemaMap() {
const schemaMap = {};
this.getSchemas.forEach((schema) => {
schemaMap[schema.key] = schema;
});
return schemaMap;
}
},
methods: {
getIfShow2: function (key) {
return this.getIfShow(this.schemaMap[key], this.formModel[this.schemaMap[key].field]);