el-radio 单选框写一个值后不能切换
解决方法:在单选框组中添加@change="
f
o
r
c
e
U
p
d
a
t
e
(
)
"
就可以了如果写在函数里面的话,用
t
h
i
s
.
forceUpdate()" 就可以了 如果写在函数里面的话,用 this.
forceUpdate()"就可以了如果写在函数里面的话,用this.forceUpdate();
<el-form-item label="结果">
<el-radio-group
v-model="ruleForm.status"
@change="$forceUpdate()"
>
<el-radio :label="1">通过</el-radio>
<el-radio :label="2">不通过</el-radio>
</el-radio-group>
</el-form-item>
// js: 写默认值
this.ruleForm.status = 3;