Skip to content

Select组件使用校验功能时,Option组件的Key不能为Number类型 #902

@MarbleShin

Description

@MarbleShin
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.3.10

Environment

系统版本:Windows 10 专业版,1809;浏览器版本:Chrome 74.0.3729.108(正式版本)(64 位);ant-design-vue版本:v1.3.10,Vue.js版本:v2.6.10

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. 使用Select组件和Option组件做成一选择器,Select组件加上了校验规则;
  2. Option组件使用v-for的方式加载,keyvalue属性均传入Number类型数据;
  3. 选择Option后显示报错,value需为String类型
  4. value显式转换为String类型或将校验规则删除,报错不出现。

What is expected?

使用Select·和Option组件时,Select组件有校验规则时,Optionvalue可以传入Number类型数据。

What is actually happening?

使用Select·和Option组件时,Select组件有校验规则时,Optionvalue传入Number类型数据,会导致报错现象。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions