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

input组件在confirm事件修改绑定值时双向绑定失效 #3078

Open
Wyatex opened this issue May 14, 2024 · 0 comments
Open

input组件在confirm事件修改绑定值时双向绑定失效 #3078

Wyatex opened this issue May 14, 2024 · 0 comments

Comments

@Wyatex
Copy link

Wyatex commented May 14, 2024

NutUI 包名

@nutui/nutui-taro

NutUI 版本号

4.3.8

平台

weapp

重现链接

https://github.com/Wyatex/input-bug

重现步骤

  1. 使用nut-input组件
  2. 使用v-model绑定一个ref
  3. 使用@confirm绑定一个方法,在方法里面清空input绑定输入值
  4. 随便在input输入文字,然后点击输入法的确认按钮或者在电脑使用开发者工具按下回车键

期望的结果是什么?

输入法按下确认之后,清空ref的值,input里的字符也应该清空

实际的结果是什么?

虽然外层组件定义的ref的value已经被清空,但是input还是显示之前输入的文字

环境信息

 taro info
👽 Taro v3.6.26

Taro CLI 3.6.26 environment info:
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 20.10.0 - D:\Program Files\nodejs\node.EXE
Yarn: 1.22.21 - D:\Program Files\nodejs\yarn.CMD
npm: 10.2.3 - D:\Program Files\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 3.6.26 => 3.6.26
@tarojs/components: 3.6.26 => 3.6.26
@tarojs/helper: 3.6.26 => 3.6.26
@tarojs/plugin-framework-vue3: 3.6.26 => 3.6.26
@tarojs/plugin-html: 3.6.26 => 3.6.26
@tarojs/plugin-platform-alipay: 3.6.26 => 3.6.26
@tarojs/plugin-platform-h5: 3.6.26 => 3.6.26
@tarojs/plugin-platform-jd: 3.6.26 => 3.6.26
@tarojs/plugin-platform-qq: 3.6.26 => 3.6.26
@tarojs/plugin-platform-swan: 3.6.26 => 3.6.26
@tarojs/plugin-platform-tt: 3.6.26 => 3.6.26
@tarojs/plugin-platform-weapp: 3.6.26 => 3.6.26
@tarojs/runtime: 3.6.26 => 3.6.26
@tarojs/shared: 3.6.26 => 3.6.26
@tarojs/taro: 3.6.26 => 3.6.26
@tarojs/taro-loader: 3.6.26 => 3.6.26
@tarojs/webpack5-runner: 3.6.26 => 3.6.26
babel-preset-taro: 3.6.26 => 3.6.26
eslint-config-taro: 3.6.26 => 3.6.26

其他补充信息

No response

@eiinu eiinu linked a pull request May 16, 2024 that will close this issue
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants