diff --git a/packages/core/src/baseeditableholder/BaseEditableHolder.vue b/packages/core/src/baseeditableholder/BaseEditableHolder.vue index b37a722548..f5ed9bde56 100644 --- a/packages/core/src/baseeditableholder/BaseEditableHolder.vue +++ b/packages/core/src/baseeditableholder/BaseEditableHolder.vue @@ -72,6 +72,14 @@ export default { handler(newValue) { this.d_value !== newValue && (this.d_value = newValue); } + }, + $formValue: { + immediate: false, + handler(newValue) { + if (this.$formName !== undefined && this.$pcForm?.states?.[this.$formName] && newValue !== this.d_value) { + this.d_value = newValue; + } + } } }, formField: {}, @@ -103,6 +111,9 @@ export default { $formDefaultValue() { return this.d_value ?? this.$pcFormField?.initialValue ?? this.$pcForm?.initialValues?.[this.$formName]; }, + $formValue() { + return this.$pcForm?.states?.[this.$formName]?.value; + }, controlled() { return this.$inProps.hasOwnProperty('modelValue') || (!this.$inProps.hasOwnProperty('modelValue') && !this.$inProps.hasOwnProperty('defaultValue')); },