code refactoring
parent
a674358076
commit
be89f54a7b
|
@ -73,7 +73,7 @@ export default {
|
||||||
this.d_value !== newValue && (this.d_value = newValue);
|
this.d_value !== newValue && (this.d_value = newValue);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
formValue: {
|
$formValue: {
|
||||||
immediate: false,
|
immediate: false,
|
||||||
handler(newValue) {
|
handler(newValue) {
|
||||||
if (this.$pcForm?.states?.[this.$formName] && newValue !== this.d_value) {
|
if (this.$pcForm?.states?.[this.$formName] && newValue !== this.d_value) {
|
||||||
|
@ -111,15 +111,15 @@ export default {
|
||||||
$formDefaultValue() {
|
$formDefaultValue() {
|
||||||
return this.d_value ?? this.$pcFormField?.initialValue ?? this.$pcForm?.initialValues?.[this.$formName];
|
return this.d_value ?? this.$pcFormField?.initialValue ?? this.$pcForm?.initialValues?.[this.$formName];
|
||||||
},
|
},
|
||||||
|
$formValue() {
|
||||||
|
return this.$pcForm?.states?.[this.$formName]?.value;
|
||||||
|
},
|
||||||
controlled() {
|
controlled() {
|
||||||
return this.$inProps.hasOwnProperty('modelValue') || (!this.$inProps.hasOwnProperty('modelValue') && !this.$inProps.hasOwnProperty('defaultValue'));
|
return this.$inProps.hasOwnProperty('modelValue') || (!this.$inProps.hasOwnProperty('modelValue') && !this.$inProps.hasOwnProperty('defaultValue'));
|
||||||
},
|
},
|
||||||
// @deprecated use $filled instead
|
// @deprecated use $filled instead
|
||||||
filled() {
|
filled() {
|
||||||
return this.$filled;
|
return this.$filled;
|
||||||
},
|
|
||||||
formValue() {
|
|
||||||
return this.$pcForm?.states?.[this.name]?.value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue