Skip to content

select组件中,<a-select-option>的value属性不允许重复,且控制台报错为:Duplicate keys detected "XXX" #3706

@wangrui950328

Description

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

Version

2.0.0

Environment

chrome、vue2.6.11

Reproduction link

Edit on CodeSandbox

Steps to reproduce

当value值相同时,即使设置了唯一的key,也会报错Duplicate keys detected “XXX”。如链接中的两个value为“选项2”,则在组件中不被允许,vue会提示报错。

What is expected?

允许用户的value值相同,只需要设置唯一的key即可,不去校验value的唯一性以便更好满足需求。

What is actually happening?

重复的value不被允许

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions