vue3使用component渲染input元素和v-model搭配使用时,v-model不起作用
<template>
<component :is="'input'" type="text" v-model="inputValue">
</component>
</template>
<script lang="ts" setup>
const inputValue = ref("");
</script>
在vue的devtools中会发现inputValue不会发生变化
添加事件可以实现数据变化,但我不想这样做。
使用v-model可以双向绑定