The v-model in @vue/compact is not work well #12513
Unanswered
wang-panfeng
asked this question in
Help/Questions
Replies: 3 comments
-
can you provide a simple reproducible repository? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry for replying late. I've been too busy recently because of the 996 work schedule(TOT). The reproduced demo is here. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Each component can have its own Options APIexport default {
name: "Vue2Vmodel",
compatConfig: {
MODE: 2,
COMPONENT_V_MODEL: true,
}
}; Composition API<script>
export default {
compatConfig: {
MODE: 3,
COMPONENT_V_MODEL: false,
},
};
</script>
<script setup>
</script> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Vue version
3.5.13
Link to minimal reproduction
NA
Steps to reproduce
Recently, we have been upgrading from Vue 2 to Vue 3 using the migration build. We found that the Vue 2 and Vue 3 syntax for v-model cannot coexist. The version of Vue3 is 3.5.13. "If I set compatConfig.MODE=2, the Vue 3 code does not work correctly; if I set compatConfig.MODE=3, then the Vue 2 code does not work correctly
code: vue2
code: vue3
<script setup> const model = defineModel(); // eslint-disable-line function update() { model.value++; } </script>What is expected?
In @vue/compact, Use vue2 and vue3 totally
What is actually happening?
v-model doesnot work well
System Info
Any additional comments?
No response
Beta Was this translation helpful? Give feedback.
All reactions