解决iview Radio 报错问题

master
lemon橪 2021-09-10 11:26:50 +08:00
parent 1ad729ca0e
commit f3914b63b3
1 changed files with 10 additions and 9 deletions

View File

@ -60,10 +60,10 @@
<div class="title">{{ item.title }}</div> <div class="title">{{ item.title }}</div>
<div class="content"> <div class="content">
<RadioGroup type="button" button-style="solid" v-model="item.isSuper"> <RadioGroup type="button" button-style="solid" v-model="item.isSuper">
<Radio :label="true"> <Radio :label="1">
<span>操作数据权限</span> <span>操作数据权限</span>
</Radio> </Radio>
<Radio :label="false"> <Radio :label="0">
<span>查看权限</span> <span>查看权限</span>
</Radio> </Radio>
</RadioGroup> </RadioGroup>
@ -280,23 +280,23 @@ export default {
{ {
props: { props: {
color: color:
data.isSuper == true data.isSuper == 1
? "red" ? "red"
: data.isSuper == false : data.isSuper == 0
? "default" ? "default"
: "default", : "default",
}, },
style: { style: {
"margin-left": "10px", "margin-left": "10px",
display: display:
data.isSuper == true || data.isSuper == false data.isSuper == 1 || data.isSuper == 0
? "inline-block" ? "inline-block"
: "none", : "none",
}, },
}, },
data.isSuper == true data.isSuper == 1
? "操作权限" ? "操作权限"
: data.isSuper == false : data.isSuper == 0
? "查看权限" ? "查看权限"
: "" : ""
), ),
@ -331,7 +331,7 @@ export default {
*/ */
setRole(val) { setRole(val) {
let enable; let enable;
val == "onlyView" ? (enable = false) : (enable = true); val == "onlyView" ? (enable = 0) : (enable = 1);
this.saveRoleWay.map((item) => { this.saveRoleWay.map((item) => {
item.isSuper = enable; item.isSuper = enable;
}); });
@ -586,7 +586,7 @@ export default {
console.log(e) console.log(e)
let perm = { let perm = {
title: e.title, title: e.title,
isSuper: e.isSuper || false, isSuper: e.isSuper ? e.isSuper = 1 : e.isSuper = 0 || 0,
menuId: e.id, menuId: e.id,
roleId: this.editRolePermId, roleId: this.editRolePermId,
}; };
@ -594,6 +594,7 @@ export default {
this.$set(this,'saveRoleWay',way) this.$set(this,'saveRoleWay',way)
}); });
console.log(this.saveRoleWay)
}, },
/**保存权限 */ /**保存权限 */