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

【stepper bug】只能输入大于0的数 #831

Open
xiaohuxd opened this issue May 19, 2023 · 0 comments
Open

【stepper bug】只能输入大于0的数 #831

xiaohuxd opened this issue May 19, 2023 · 0 comments

Comments

@xiaohuxd
Copy link

xiaohuxd commented May 19, 2023

在stepper的源码中有一个$_formatNum函数会将输入的数字里面的负号去掉,导致只能输入大于等于的数

    $_formatNum(value) {
      // @elist
      value = String(value).replace(/[^0-9.-]|^-|^\./g, '')
      return value === '' ? 0 : this.isInteger ? Math.floor(value) : +value
    },

官网的demo也有这个bug
image

@Version 2.6.1

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