mand-mobile icon indicating copy to clipboard operation
mand-mobile copied to clipboard

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

Open xiaohuxd opened this issue 1 year ago • 0 comments

在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

xiaohuxd avatar May 19 '23 03:05 xiaohuxd