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][Form] 点击重置后无法双向赋值 导致组件不能使用且出现赋值异常 #2021

Closed
Jiachang-Cai opened this issue Jan 9, 2023 · 3 comments
Labels
invalid This doesn't seem right

Comments

@Jiachang-Cai
Copy link

tdesign-vue 版本

1.0.3

重现链接

https://stackblitz.com/edit/angular-xcbjom?file=src/demo.vue

重现步骤

161_1673232447.mp4

期望结果

重置不影响双向赋值和赋值异常

实际结果

影响双向赋值和赋值异常

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2023

♥️ 有劳 @geff1991 @skytt @uyarn 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @Jiachang-Cai

@chaishi chaishi changed the title [Form] 点击重置后无法双向赋值 导致组件不能使用且出现赋值异常 [Select][Form] 点击重置后无法双向赋值 导致组件不能使用且出现赋值异常 Jan 10, 2023
@chaishi chaishi added the 🐞 bug Something isn't working label Jan 10, 2023
@chaishi chaishi added invalid This doesn't seem right and removed 🐞 bug Something isn't working labels Jan 10, 2023
@skytt
Copy link
Contributor

skytt commented Jan 10, 2023

看起来是初始数据字段不正确,具体检查 courselevel 字段

另外,看代码的预期你似乎想把一个数组的 value 传入到一个单选的 Select 组件,这样的操作会导致组件无法正常使用,同时会有控制台报错,可以留意一下

我修改 demo 后,试了一下 单选 和 多选 的场景都是正常的,供参考:
单选:https://stackblitz.com/edit/angular-xcbjom-ci9ncp?file=src%2Fdemo.vue
多选:https://stackblitz.com/edit/angular-xcbjom-6noubn?file=src%2Fdemo.vue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants