-
Notifications
You must be signed in to change notification settings - Fork 383
[Select] 唯一标识不可修改 #3799
Copy link
Copy link
Closed
Labels
💪🏻 enhancementNew feature or requestNew feature or request🧐 unconfirmedwaiting to be confirmedwaiting to be confirmed
Description
这个功能解决了什么问题
灵活配置option的唯一标识,大多数情况下都有以下需求:
可能多个选项绑定的值是相同的,但是label不一样此时无法区分选中的数据项
你建议的方案是什么
<t-select v-model="value1" :options="options" placeholder="请选择云解决方案" multiple @change="handleChange" />
options: [
{ key: 1, label: '云服务器', value: '1' },
{ key: 2, label: '云数据库', value: '1' },
{ key: 3, label: '域名注册', value: '1' },
{ key: 4, label: '网站备案', value: '1' },
{ key: 5, label: '对象存储', value: '1' },
{ key: 6, label: '低代码平台', value: '1' },
]
代码如上,option的唯一标识字段为value,加一个唯一标识字段key?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
💪🏻 enhancementNew feature or requestNew feature or request🧐 unconfirmedwaiting to be confirmedwaiting to be confirmed