Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5下 input 组件 v-model 和 @input 事件无效 #4906

Open
student-ice opened this issue May 16, 2024 · 0 comments
Open

H5下 input 组件 v-model 和 @input 事件无效 #4906

student-ice opened this issue May 16, 2024 · 0 comments

Comments

@student-ice
Copy link

<input
            v-model="phone"
            type="number"
            placeholder="请输入手机号"
            maxlength="11"
            @input="phoneInput"
          />
const phone = ref()
const phoneInput = (e) => {
  console.log(e)
};

Vue3

代码大概是这样,在小程序中,输入的时候可以触发input事件,phone的值也是正确的,
在h5中Input 事件不会触发,phone 的值也始终是undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant