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

The selected style does not appear after the radio binding array is selected #4352

Open
1 task done
fuzi1996 opened this issue Jul 9, 2021 · 6 comments
Open
1 task done

Comments

@fuzi1996
Copy link

fuzi1996 commented Jul 9, 2021

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

Version

2.2.1

Environment

window 10/Microsoft Edge 91.0.864.64

Reproduction link

Edit on CodeSandbox

Steps to reproduce

点击数组

What is expected?

点击数组应当与点击字符串一致,出现选中样式

What is actually happening?

点击数组,没有出现选中样式


另外vue2的2.6.14也出现这种情况,详见:

Reproduction link

Edit on CodeSandbox

@github-actions github-actions bot changed the title radio 绑定数组选中后未出现选中样式 The selected style does not appear after the radio binding array is selected Jul 9, 2021
@fuzi1996
Copy link
Author

fuzi1996 commented Jul 9, 2021

这个是因为值被vue观察导致。这个值是不是不应该是任意类型,而应该是string,number,boolean

@tangjinzhou
Copy link
Member

你是对的 不支持数组的

@tangjinzhou
Copy link
Member

欢迎 PR

@github-actions
Copy link

Hello @fuzi1996. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch, fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @fuzi1996,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

@snowtreetree
Copy link
Contributor

snowtreetree commented Jul 31, 2021

我觉得支持数组或者对象的会有较多不必要的工作量,value为什么不直接使用对应的值呢,而是自己再去写一遍value?
是不是可以这么写:
Edit vue3-antd (forked)

@Hccake
Copy link

Hccake commented Aug 24, 2021

你是对的 不支持数组的

那为什么不支持 number 呢,当使用 number 为 option value ,且 select mode 为 tag 时,控制台打印

Invalid value of type number supplied to Option, expected string when tags/combobox is true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants