From d756a32914c82c89cf05d60111bbad2ae108d5cb Mon Sep 17 00:00:00 2001 From: tianwenjie Date: Mon, 15 Jan 2024 14:10:07 +0800 Subject: [PATCH] feat: optimize --- src/form/common-form.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/form/common-form.ts b/src/form/common-form.ts index 0c63dd800..95b1a5460 100644 --- a/src/form/common-form.ts +++ b/src/form/common-form.ts @@ -20,11 +20,11 @@ import { coerceAttrBoolean } from '../utils'; export class CommonFormControl implements ControlValueAccessor { @Input() get disabled() { - return this._disabled; + return this._readonly || this._disabled; } set disabled(val: boolean | '') { - this._disabled = this._readonly || coerceAttrBoolean(val); + this._disabled = coerceAttrBoolean(val); } @Input()