Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Select] 当valueType为object的时候,value值不是完整的option项 #3188

Closed
Loinver opened this issue May 30, 2024 · 2 comments
Closed
Labels
usage the issue is about usage

Comments

@Loinver
Copy link

Loinver commented May 30, 2024

tdesign-vue 版本

1.9.4

重现链接

https://stackblitz.com/edit/71mbwi?file=src%2Fdemo.vue,package.json

重现步骤

valueType="object"且options为: [
{ label: '架构云', value: '1', title: '架构云选项' },
{ label: '大数据', value: '2', title: '大数据选项' },
{ label: '区块链', value: '3', title: '区块链选项' },
{ label: '物联网', value: '4', disabled: true },
{ label: '人工智能', value: '5', title: '人工智能选项' },
],

期望结果

下拉框绑定的value是完整的option对象 { label: '架构云', value: '1', title: '架构云选项' }

实际结果

仅有 { label: '架构云', value: '1' }

框架版本

2.6.14

浏览器版本

谷歌 120

系统版本

macos 14.4

Node版本

16.x

补充说明

No response

Copy link
Contributor

👋 @Loinver,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@uyarn
Copy link
Collaborator

uyarn commented Jun 6, 2024

这个不是缺陷 valueType object 如文档所说 是 需要输出选中值包含 label 时使用,如果需要获取整个选项的全部内容,可以通过onchange回调的第二个参数中的option属性获取

@uyarn uyarn added the usage the issue is about usage label Jun 6, 2024
@uyarn uyarn closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage the issue is about usage
Projects
None yet
Development

No branches or pull requests

2 participants