1aaf1684c34add1ed6f78af9cf12861e3256a5a3.svn-base 684 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div class="dashboard-container">
  3. <component :is="currentRole" ref="child" />
  4. </div>
  5. </template>
  6. <script>
  7. import { mapGetters } from 'vuex'
  8. import editorDashboard from './editor'
  9. export default {
  10. inject: ['reload'],
  11. name: 'Dashboard',
  12. components: { editorDashboard },
  13. data() {
  14. return {
  15. currentRole: 'editorDashboard'
  16. }
  17. },
  18. computed: {
  19. ...mapGetters([
  20. 'roles'
  21. ])
  22. },
  23. created() {
  24. // if (!this.roles.includes('admin')) {
  25. this.currentRole = 'editorDashboard'
  26. // }
  27. },
  28. mounted() {
  29. this.$nextTick(() => {
  30. this.$refs.child.getList()
  31. })
  32. },
  33. methods: {
  34. }
  35. }
  36. </script>