elementUI——Form表单radio选择绑定数字
参考:https://blog.csdn.net/weixin_38353851/article/details/93662136
原:
<el-radio-group v-model="form.isJoined"> <el-radio label=0>是</el-radio> <el-radio label=1>否</el-radio> </el-radio-group>
问题:1. 编辑时,后台返回isJoined字段为null,无法先选择"是",只有选择"否"后才能选择"是"
2. 提交表单时,发现传过去的isJoined字段为"0"或"1",而非我想要的数字0或1
改:
<el-radio-group v-model="form.isJoined"> <el-radio :label="0">是</el-radio> <el-radio :label="1">否</el-radio> </el-radio-group>