Open
Description
Vue version
v3.5.13
Link to minimal reproduction
Steps to reproduce
- Change value of v-model in
Promise.resolve().then
in setup.
<script>
setup () {
const variable = ref('oldValue')
Promise.resolve().then(() => {
variable.value = 'newValue'
})
}
</script>
<input v-model="variable">
- Use it as a async component
const AsyncComponent = defineAsyncComponent(() => Promise.resolve(NormalComponent))
What is expected?
the <input>
will be changed to 'newValue'
What is actually happening?
then, the newValue does not reflect for the <input>
. it still shows oldValue
.
System Info
System:
OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 5.39 GB / 15.27 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 20.10.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 6.15.1 - /usr/local/bin/pnpm
Browsers:
Chrome: 131.0.6778.85
Any additional comments?
This issue was reported as a Vue bug based on an investigation by members of the Nuxt community.
ref: nuxt/nuxt#30590