问题我想在页面初始化时,根据后台数据,确定单选按钮的选中状态。现在问题是,数据是传到了,不过按钮样式没有更新代码// 单选按钮数据
status_arr: [
{
text: "待确认",
code: "0"
},
{
text: "已确认,待赴约",
code: "1"
},
{
text: "已赴约",
code: "2"
},
{
text: "已取消",
code: "3"
},
{
text: "已退款",
code: "4"
}
]
// 按钮循环
<el-radio-group v-model="form.status">
<template v-for="(item, index) in status_arr">
<el-radio
:label="item.code"
>{{item.text}}</el-radio>
</template>
</el-radio-group>
// vue created() 初始化
props: ["orderInfo"],
created() { this.form.status = this.orderInfo.status;
},
mounted() {
console.log(this.form.status)
},截图
添加回答
举报
0/150
提交
取消