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

Slider <n-slider> “min” sets a negative number and reports an error #5097

Closed
VictorZenbill opened this issue Jul 24, 2023 · 1 comment
Closed
Labels
untriaged need to sort

Comments

@VictorZenbill
Copy link

TuSimple/naive-ui version (版本)

2.34.4

Vue version (Vue 版本)

3.3.4

Browser and its version (浏览器及其版本)

114.0.5735.110(正式版本) (64 位)

System and its version (系统及其版本)

win11

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/friendly-wildflower-m78wyr?file=/src/Demo.vue:36-45

Reappearance steps (重现步骤)

1.The tag sets min="-10"(any negative number || any number < 0)
2. slide the slider
3.An error occurred.

Expected results (期望的结果)

Show negative numbers for sliding.
This tag should support negative numbers.3Q

Actual results (实际的结果)

an error occurs.
TypeError
newValue.toFixed is not a function
getRoundValue
https://m78wyr.csb.app/node_modules/naive-ui/es/slider/src/Slider.js:249:30
sanitizeValue
https://m78wyr.csb.app/node_modules/naive-ui/es/slider/src/Slider.js:229:28
handleRailMouseDown
https://m78wyr.csb.app/node_modules/naive-ui/es/slider/src/Slider.js:328:25
at callWithErrorHandling (https://m78wyr.csb.app/node_modules/
vue/runtime-core/dist/runtime-core.esm-bundler.js:999:18
at callWithAsyncErrorHandling (https://m78wyr.csb.app/node_modules/
vue/runtime-core/dist/runtime-core.esm-bundler.js:1007:17
at HTMLDivElement.invoker (https://m78wyr.csb.app/node_modules/
vue/runtime-dom/dist/runtime-dom.esm-bundler.js:408:62

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Jul 24, 2023
@jahnli
Copy link
Collaborator

jahnli commented Mar 13, 2024

This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem

@jahnli jahnli closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged need to sort
Projects
None yet
Development

No branches or pull requests

2 participants