Skip to content

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

@xiaohuxd

Description

@xiaohuxd

在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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions