perf: nest field change may be lead blink

This commit is contained in:
ibuler
2024-07-11 15:13:27 +08:00
committed by 老广
parent 46ee116f3e
commit e75d711e0a

View File

@@ -85,6 +85,7 @@ export default {
// 如果不想等,证明是 value 自己变化导致的, 需要重新渲染
if (valJson !== this.formJson) {
this.iValue = val
this.$log.debug('Sub form value changed, rerender form: ', this.formJson, valJson)
this.loading = true
setTimeout(() => {
this.loading = false
@@ -95,11 +96,12 @@ export default {
}
},
methods: {
outputValue: _.debounce(function(val) {
this.$emit('input', val)
}),
updateValue(val) {
this.iValue = val
setTimeout(() => {
this.$emit('input', val)
}, 100)
this.outputValue(val)
},
objectToString(obj) {
let data = ''