切换角色样式调整
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
41ac3d562a
commit
3c50254a2d
|
@ -40,6 +40,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="save"
|
@click="save"
|
||||||
|
:disabled="saveDisabled"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
v-if="hasRole"
|
v-if="hasRole"
|
||||||
>
|
>
|
||||||
|
@ -78,6 +79,9 @@ export default {
|
||||||
hasRole() {
|
hasRole() {
|
||||||
return this.roles && this.roles.length > 0
|
return this.roles && this.roles.length > 0
|
||||||
},
|
},
|
||||||
|
saveDisabled() {
|
||||||
|
return this.form.userRoleId === zzSessionStorage.getItem('userId')
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -98,11 +102,13 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.roles {
|
.roles {
|
||||||
width: 100%;
|
max-width: 365px;
|
||||||
|
width: fit-content;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
justify-content: center;
|
// justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-radio__original {
|
/deep/ .el-radio__original {
|
||||||
|
@ -113,4 +119,7 @@ export default {
|
||||||
.el-radio__inner {
|
.el-radio__inner {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
.el-radio {
|
||||||
|
width: 60px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -127,7 +127,7 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- 修改 -->
|
<!-- 修改 -->
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="!userRoleId"
|
:disabled="!userRoleId || saveDisabled"
|
||||||
class="saveBtn"
|
class="saveBtn"
|
||||||
:loading="toggleRoleLoading"
|
:loading="toggleRoleLoading"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -215,6 +215,9 @@ export default {
|
||||||
hasRole() {
|
hasRole() {
|
||||||
return this.roles && this.roles.length > 1
|
return this.roles && this.roles.length > 1
|
||||||
},
|
},
|
||||||
|
saveDisabled() {
|
||||||
|
return this.userRoleId === zzSessionStorage.getItem('userId')
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 切换角色
|
// 切换角色
|
||||||
|
@ -341,4 +344,7 @@ export default {
|
||||||
.el-radio-group {
|
.el-radio-group {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
|
.el-radio {
|
||||||
|
width: 60px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue