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