perf[permission]:set role => roles
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<div style="margin-bottom:15px;">{{$t('permission.roles')}}: {{roles}}</div>
|
||||
{{$t('permission.switchRoles')}}:
|
||||
<el-radio-group v-model="role">
|
||||
<el-radio-group v-model="switchRoles">
|
||||
<el-radio-button label="editor"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
@@ -15,7 +15,7 @@ export default{
|
||||
name: 'permission',
|
||||
data() {
|
||||
return {
|
||||
role: ''
|
||||
switchRoles: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -24,8 +24,8 @@ export default{
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
role(val) {
|
||||
this.$store.dispatch('ChangeRole', val).then(() => {
|
||||
switchRoles(val) {
|
||||
this.$store.dispatch('ChangeRoles', val).then(() => {
|
||||
this.$router.push({ path: '/permission/index?' + +new Date() })
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user