Subscribe on changes!

v-model for component doesn't work as expected.

avatar
Feb 16th 2022

Version

3.2.31

Reproduction link

sfc.vuejs.org/

Steps to reproduce

  1. change the v-model value and emit update:modelValue event in the child component.
  2. The value doesn't change in the father component.

What is expected?

When change the v-model value in child component, the value should change in the father component.

What is actually happening?

The value of v-model variable in the father component doesn't change.


This bug doesn't appear in setup script. This bug can only be reproduced when the father component uses setup option.

avatar
Feb 16th 2022

obj needs to be a ref