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

数字输入框组件有问题,初始赋值是数字,最后拿到的是字符串类型的数字 #3252

Open
shitou158 opened this issue Mar 14, 2025 · 0 comments

Comments

@shitou158
Copy link

NutUI 包名

@nutui/nutui-taro

NutUI 版本号

4.3.13

平台

h5

重现链接

https://nutui.jd.com/playground/#eyJBcHAudnVlIjoiPHRlbXBsYXRlPlxuICB7e3R5cGVvZih2YWwpfX1cbiAgPG51dC1pbnB1dC1udW1iZXIgdi1tb2RlbD1cInZhbFwiIC8+XG48L3RlbXBsYXRlPlxuPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbmltcG9ydCB7IHJlZix3YXRjaCB9IGZyb20gJ3Z1ZSdcbmNvbnN0IHZhbCA9IHJlZigxKVxuXG4gIHdhdGNoKCgpPT52YWwudmFsdWUsKCk9PntcbiAgICBjb25zb2xlLmxvZyh2YWwudmFsdWUsdHlwZW9mKHZhbC52YWx1ZSkpXG4gIH0pXG48L3NjcmlwdD4ifQ==

重现步骤

初始赋值是数字类型,点击数字输入框的加号或者减号,watch里拿到的值是字符串类型的值

虽然对前端来说没什么问题,但是对后端来说存到库里的数据对后端的影响就大了

期望的结果是什么?

初始是数字,组件返回的值应该还是数字

实际的结果是什么?

初始是数字,组件返回的值是字符串

环境信息

No response

其他补充信息

No response

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