修改field错误问题

This commit is contained in:
黄焱
2024-03-25 09:07:45 +08:00
parent 53c4b01a74
commit 57bfec02eb

View File

@@ -83,12 +83,8 @@ patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
);
patch(Field.prototype, 'jikimo_frontend.Field', {
setup() {
this.FieldComponent = this.props.fieldInfo.FieldComponent;
if (!this.FieldComponent) {
const fieldType = this.props.record.fields[this.props.name].type;
this.FieldComponent = getFieldClassFromRegistry(fieldType, this.props.type);
}
owl.onMounted(this.setRequired);
return this._super(...arguments);
},
setRequired() {
const id = this.props.id