ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

form里a-radio-group与a-checkbox-group绑定的是级联数据浏览器会报incorrect use of <label for=FORM_ELEMENT>

Open allposs opened this issue 1 year ago • 0 comments
trafficstars

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

Version

4.0.8

Environment

mac 13.2.1 ,chrome 120.0.6099.129,npm 9.6.2

Reproduction link

Edit on CodeSandbox

Steps to reproduce

环境中运行此代码

<script setup lang="ts">
import { ref } from "vue";
const form = ref({ value: { value: "a" } });
</script>

<template>
<a-form :model="form">
<a-form-item
:name="['value', 'value']"
label="value"
:rules="[{ required: true, message: '节点类型不能为空!' }]"
>
<a-radio-group v-model:value="form.value.value">
<a-radio value="a">item 1</a-radio>
<a-radio value="b">item 2</a-radio>
<a-radio value="c">item 3</a-radio>
</a-radio-group>
</a-form-item>
</a-form>
</template>

现象截图 screenshot-20240105-182048

What is expected?

form里a-radio-group与a-checkbox-group绑定的是级联数据表单能正常校验

What is actually happening?

form里a-radio-group与a-checkbox-group绑定的是级联数据浏览器会报incorrect use of

allposs avatar Jan 05 '24 10:01 allposs