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

[t-radio-group] options将value=0的放到最后,选中状态的显示不正常 #2078

Closed
CanvaChen opened this issue Jun 11, 2023 · 2 comments · Fixed by #2082
Closed

[t-radio-group] options将value=0的放到最后,选中状态的显示不正常 #2078

CanvaChen opened this issue Jun 11, 2023 · 2 comments · Fixed by #2082
Labels
bug Something isn't working in progress issue or pull request is in progress

Comments

@CanvaChen
Copy link

tdesign-miniprogram 版本

1.1.8

重现链接

No response

重现步骤

界面引入t-radio-group,options将value=0的放到最后,即可复现。

index.wxml如下:

<t-radio-group bind:change="onChange" value="{{current}}" options="{{options}}" />

index.js如下:

Page({
  data: {
    current: 1,
    options: [
      { value: 1, label: '单选value=1' },
      { value: 0, label: '单选value=0' },
    ],
  },
  onChange(event) {
    const { value } = event.detail;
    this.setData({ current: value });
  }
});

期望结果

被选中那行显示选中状态

实际结果

  1. 点击“单选value=1”选中了两个
    image

  2. 点击“单选value=0”一个都没选中
    image

基础库版本

2.31.0

补充说明

以服务端定义的枚举值做为value,且显示顺序不按0/1/2/3...

@github-actions
Copy link
Contributor

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

@betavs
Copy link
Collaborator

betavs commented Jun 12, 2023

@CanvaChen

企业微信截图_3e521194-6286-44ef-adf7-295e5b979373

@LeeJim LeeJim added bug Something isn't working in progress issue or pull request is in progress labels Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress issue or pull request is in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants