Tencent / tdesign-vue-next

A Vue3.x UI components lib for TDesign.
https://tdesign.tencent.com/vue-next
MIT License
1.35k stars 445 forks source link

[RadioGroup] RadioGroup组件无法获取到name #4350

Open Hank-Zhou opened 5 days ago

Hank-Zhou commented 5 days ago

tdesign-vue-next 版本

1.9.5

重现链接

No response

重现步骤

<template>
    <t-form>
          <t-form-item label="是否缓存" name="isCache">
            <t-radio-group name="isCache" :value="menuItem.isCache" @change="onRadioChange">
              <t-radio value="0">否</t-radio>
              <t-radio value="1">是</t-radio>
            </t-radio-group>
          </t-form-item>
          <t-form-item label="是否外链" name="isFrame">
            <t-radio-group name="isFrame" :value="menuItem.isFrame" @change="onRadioChange">
              <t-radio value="0">否</t-radio>
              <t-radio value="1">是</t-radio>
            </t-radio-group>
          </t-form-item>
          <t-form-item label="是否显示" name="visible">
            <t-radio-group name="visible" :value="menuItem.visible" @change="onRadioChange">
              <t-radio value="0">否</t-radio>
              <t-radio value="1">是</t-radio>
            </t-radio-group>
          </t-form-item>
    </t-form>
</template>

<script setup lang='ts'>
const onRadioChange = (value: any, context: any) => {
  console.log(value);
  console.log(context);
};
</script>

期望结果

根据文档t-radio-group是提供了name属性的,期望从name中获取自定义的数据

实际结果

监听时间中获取的context中没有name字段

框架版本

3.3.13

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

IssueShoot

github-actions[bot] commented 5 days ago

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

1379255913 commented 21 hours ago

认领