| 1234567891011121314151617181920212223242526272829303132333435363738 | <template>  <div class="dashboard-container">    <component :is="currentRole" ref="child" />  </div></template><script>import { mapGetters } from 'vuex'import editorDashboard from './editor'export default {  inject: ['reload'],  name: 'Dashboard',  components: { editorDashboard },  data() {    return {      currentRole: 'editorDashboard'    }  },  computed: {    ...mapGetters([      'roles'    ])  },  created() {    // if (!this.roles.includes('admin')) {    this.currentRole = 'editorDashboard'    // }  },  mounted() {    this.$nextTick(() => {      this.$refs.child.getList()    })  },  methods: {  }}</script>
 |