Skip to content

Commit

Permalink
解决iview Radio 报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon橪 committed Sep 10, 2021
1 parent 1ad729c commit f3914b6
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions manager/src/views/sys/role-manage/roleManage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
<div class="title">{{ item.title }}</div>
<div class="content">
<RadioGroup type="button" button-style="solid" v-model="item.isSuper">
<Radio :label="true">
<Radio :label="1">
<span>操作数据权限</span>
</Radio>
<Radio :label="false">
<Radio :label="0">
<span>查看权限</span>
</Radio>
</RadioGroup>
Expand Down Expand Up @@ -280,23 +280,23 @@ export default {
{
props: {
color:
data.isSuper == true
data.isSuper == 1
? "red"
: data.isSuper == false
: data.isSuper == 0
? "default"
: "default",
},
style: {
"margin-left": "10px",
display:
data.isSuper == true || data.isSuper == false
data.isSuper == 1 || data.isSuper == 0
? "inline-block"
: "none",
},
},
data.isSuper == true
data.isSuper == 1
? "操作权限"
: data.isSuper == false
: data.isSuper == 0
? "查看权限"
: ""
),
Expand Down Expand Up @@ -331,7 +331,7 @@ export default {
*/
setRole(val) {
let enable;
val == "onlyView" ? (enable = false) : (enable = true);
val == "onlyView" ? (enable = 0) : (enable = 1);
this.saveRoleWay.map((item) => {
item.isSuper = enable;
});
Expand Down Expand Up @@ -586,14 +586,15 @@ export default {
console.log(e)
let perm = {
title: e.title,
isSuper: e.isSuper || false,
isSuper: e.isSuper ? e.isSuper = 1 : e.isSuper = 0 || 0,
menuId: e.id,
roleId: this.editRolePermId,
};
way.push(perm);
this.$set(this,'saveRoleWay',way)
});
console.log(this.saveRoleWay)
},
/**保存权限 */
Expand Down

0 comments on commit f3914b6

Please sign in to comment.