郑永安
2023-06-19 2befd4a5d3733520b69ed97da88e675b6b086a3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<template>
  <div class="dashboard-container">
    {{ getComponentByRole }}
    <component :is="currentRole" />
  </div>
</template>
 
<script>
import { mapGetters } from 'vuex'
import menuIndex from '../enterprise/basic'
 
export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'userType',
    ]),
    getComponentByRole() {
      this.currentRole = 'menuIndex'
      return
    }
  },
  components: { menuIndex },
  data() {
    return {
      currentRole: 'menuIndex'
    }
  }
}
</script>