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

[下拉菜单] 当值为空字符串时无效 #979

Closed
ry0513 opened this issue Jul 22, 2023 · 1 comment · Fixed by #980
Closed

[下拉菜单] 当值为空字符串时无效 #979

ry0513 opened this issue Jul 22, 2023 · 1 comment · Fixed by #980
Assignees
Labels
bug Something isn't working

Comments

@ry0513
Copy link

ry0513 commented Jul 22, 2023

tdesign-mobile-vue 版本

1.0.0-rc.4 复现

重现链接

https://stackblitz.com/edit/he3g3a?file=src%2Fdemo.vue

重现步骤

打开链接 https://stackblitz.com/edit/he3g3a?file=src%2Fdemo.vue,

// 当 options 含有空字符串时
const options = [
  {
    value: '',
    label: '全部',
  },
  {
    value: 'a',
    label: '选项A',
  },
  {
    value: 'b',
    label: '选项B',
  },
];

下拉菜单先切换到选项A,然后在切换回全部,menuValue 的并不变成空字符串,还停留在选项A上

期望结果

期望结果是下拉菜单能够可以和选项卡一样支持空字符串

实际结果

下拉菜单先切换到选项A,然后在切换回全部,menuValue 的并不变成空字符串,还停留在选项A上

框架版本

"vue": "^3.2.47"

浏览器版本

Google Chrome 114.0.5735.199

系统版本

win11专业版 22H2 - 22621.1848

Node版本

v16.20.0

补充说明

场景:请求后台数据时,想用空值作为查询全部

@github-actions
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants