Open deot opened 1 year ago
A new problem after #6614 fixed
Workaround:
watch(
() => isActive.value,
(v) => {
if (v) {
loadData()
}
},
// use post
{ flush: 'post' }
)
Workaround:
watch( () => isActive.value, (v) => { if (v) { loadData() } }, // use post { flush: 'post' } )
this workaround seems no work,vue will flush pre end post job when render a new component in vue 3.2.39
As a workaround, use a sync flush watcher:
watch(
() => isActive.value,
v => {
// ...
},
{ flush: 'sync' }
)
Vue version
3.2.39
Link to minimal reproduction
SFC Playground
Steps to reproduce
1,1,2,2
will appearWhat is expected?
1,2,1,2
will appearWhat is actually happening?
Log: 1, 1, 2, 2
System Info
No response
Any additional comments?
No response