Blame view

src/views/dashboard/index.vue 588 Bytes
80a28914e   吉鹏   init
1
2
  <template>
    <div class="dashboard-container">
a795fa7b1   Adam   auto commit the c...
3
4
      <div class="dashboard-text">用户名: {{ name }}</div>
      <div class="dashboard-text">角色: <span v-for="role in roles" :key="role">{{ role }}</span></div>
80a28914e   吉鹏   init
5
6
    </div>
  </template>
a795fa7b1   Adam   auto commit the c...
7

80a28914e   吉鹏   init
8
9
  <script>
  import { mapGetters } from 'vuex'
a795fa7b1   Adam   auto commit the c...
10
  import ElementUI from 'element-ui'
80a28914e   吉鹏   init
11
12
13
14
15
  
  export default {
    name: 'Dashboard',
    computed: {
      ...mapGetters([
cf56a6c30   吉鹏   init role permission
16
17
        'name',
        'roles'
80a28914e   吉鹏   init
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
      ])
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .dashboard {
    &-container {
      margin: 30px;
    }
    &-text {
      font-size: 30px;
      line-height: 46px;
    }
  }
  </style>