This commit is contained in:
Pan
2017-06-26 13:38:24 +08:00
commit c528bd8ad0
61 changed files with 3251 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<template>
<div class="dashboard-editor-container">
dashboard
</div>
</template>

View File

@@ -0,0 +1,38 @@
<template>
<div class="dashboard-container">
<component v-bind:is="currentRole"> </component>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import DefaultDashboard from './default/index';
export default {
name: 'dashboard',
components: { DefaultDashboard },
data() {
return {
currentRole: 'DefaultDashboard'
}
},
computed: {
...mapGetters([
'name',
'avatar',
'email',
'introduction',
'roles'
])
},
created() {
if (this.roles.indexOf('admin') >= 0) {
return;
}
// const isEditor = this.roles.some(v => v.indexOf('editor') >= 0)
// if (!isEditor) {
// this.currentRole = 'DefaultDashboard';
// }
this.currentRole = 'DefaultDashboard';
}
}
</script>