el-radio-button自动选中的问题?
代码如下:
<vab-table v-loading="loading"
:column="tableData.column"
:data="tableData.data"
:formData="formData"
:formConfig="formConfig"
background
stripe
filter
:actions="actions"
row-key="id"
layout="total, sizes, prev, pager, next, jumper"
:page-sizes="[5, 10, 20, 30]"
:total="tableData.total"
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
@size-change="handleSizeChange"
@p-filter-request="handleRequest"
@p-add="handleAdd"
@p-current-change="handleCurrentChange">
</vab-table>
formDesc: {
state_eq: {
layout: 24,
type: "radio-button",
on: {
// 按钮事件触发
change: (v) => {
this.handleRequest(v)
}
},
isOptions: true,
options: [
{
text: "测试",
value: 0,
label: "测试"
},
{
text: "开发部",
value: 1
},
]
},
}
},
是封装过的radio-button,尝试着label赋值测试的结果没有效果
效果如图
看下封装的radio接收的是string还是number,传参就需要传递相同类型的数据,可以试试把传递的value改成字符串看下效果