uni-app中input组件能否v-model和@input一起使用?
uni-app中input组件能否v-model和@input一起使用?
问题描述
一旦触发input事件就会报错“TypeError: fn is not a function”,不使用v-model绑定就是正常的
vue3 setup 编译成微信小程序
代码示例
<template>
<input v-model="text" [@input](/user/input)="change" />
</template>
<script setup>
import {ref} from 'vue';
const text = ref('');
const change = (e)=>{
console.log(e.target.value);
}
</script>
更多关于uni-app中input组件能否v-model和@input一起使用?的实战教程也可以访问 https://www.itying.com/category-93-b0.html
7 回复
我补充下,我是在v-for的input后报错的
我看去年8月份的时候也有人提了类似的问题,问题和我的差不多,都是xx is not a function; 但是双向绑定值是生效的,就是会报这个错误。
您好,能看下后续的补充吗
你好,请问能看下后续的回复吗?
回复 1***@qq.com: 感谢反馈,已复现这个问题,还需进一步验证问题产生原因