Skip to content

Commit 79c7160

Browse files
committed
perf[permission]:set role => roles
1 parent c2271d0 commit 79c7160

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ npm run build --report
3030
![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif)
3131

3232
## Extra
33-
If you want router permission && generate menu by user role , you can use this branch [permission-control](https://github.com/PanJiaChen/vueAdmin-template/tree/permission-control)
33+
If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vueAdmin-template/tree/permission-control)
3434

3535
## Related Project
3636
[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)

src/store/modules/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const user = {
4545
return new Promise((resolve, reject) => {
4646
getInfo(state.token).then(response => {
4747
const data = response.data
48-
commit('SET_ROLES', data.role)
48+
commit('SET_ROLES', data.roles)
4949
commit('SET_NAME', data.name)
5050
commit('SET_AVATAR', data.avatar)
5151
resolve(response)

src/views/dashboard/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="dashboard-container">
33
<div class="dashboard-text">name:{{name}}</div>
4-
<div class="dashboard-text">role:<span v-for='role in roles' :key='role'>{{role}}</span></div>
4+
<div class="dashboard-text">roles:<span v-for='role in roles' :key='role'>{{role}}</span></div>
55
</div>
66
</template>
77

0 commit comments

Comments
 (0)