index首页代码修改
This commit is contained in:
		@@ -6,8 +6,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { mapGetters } from 'vuex'
 | 
					import { mapGetters } from 'vuex'
 | 
				
			||||||
import adminDashboard from './admin/index'
 | 
					import adminDashboard from './admin'
 | 
				
			||||||
import editorDashboard from './editor/index'
 | 
					import editorDashboard from './editor'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'dashboard',
 | 
					  name: 'dashboard',
 | 
				
			||||||
@@ -23,10 +23,9 @@ export default {
 | 
				
			|||||||
    ])
 | 
					    ])
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
    if (this.roles.indexOf('admin') >= 0) {
 | 
					    if (!this.roles.includes('admin')) {
 | 
				
			||||||
      return
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
      this.currentRole = 'editorDashboard'
 | 
					      this.currentRole = 'editorDashboard'
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user