957 Star 5.1K Fork 1.6K

GVPsmallwei / Avue

 / 详情

字段为radio类型,如果实际值为数字1,则修改页面无法默认选中

已完成
创建于  
2018-07-13 15:44

const DIC = {
vaild: [{
label: '否',
value: '0'
},
{
label: '是',
value: '1'
}
]
}

如果实际值为boolean时,报错如下:

[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "value"

found in

---> at D:\workspace-sts\my-avue\packages\crud\src\crud-radio.vue





at D:\workspace-sts\my-avue\packages\crud\src\main.vue



at D:\workspace-sts\my-avue\src\components\basic-container\main.vue
at D:\workspace-sts\my-avue\src\views\admin\smartbi\index.vue

... (1 recursive calls)
at D:\workspace-sts\my-avue\src\page\index\index.vue
at D:\workspace-sts\my-avue\src\App.vue

评论 (1)

dongwenting 创建了任务
smallwei 修改任务状态为进行中
smallwei 添加了标签bug
dongwenting 更新了任务
smallwei 修改任务状态为已拒绝

数字和字符串是有区别的
如果值为数字,对应的字典也要为数字,不为bug

smallwei 修改任务状态为进行中
smallwei 指派了任务给smallwei
smallwei 修改任务状态为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
632261 smallweigit 1588214431
JavaScript
1
https://gitee.com/smallweigit/avue.git
git@gitee.com:smallweigit/avue.git
smallweigit
avue
Avue

搜索帮助