36 lines
		
	
	
		
			649 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			649 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <section class="AppAccountRole">
 | |
|     <add-account-role v-if="showDetail"/>
 | |
|     <account-role-list v-else/>
 | |
|   </section>
 | |
| </template>
 | |
| 
 | |
| <script>
 | |
| import AddAccountRole from "./addAccountRole";
 | |
| import AccountRoleList from "./accountRoleList";
 | |
| 
 | |
| export default {
 | |
|   name: "AppAccountRole",
 | |
|   label: "账号角色管理",
 | |
|   props: {
 | |
|     instance: Function
 | |
|   },
 | |
|   components: {AccountRoleList, AddAccountRole},
 | |
|   computed: {
 | |
|     showDetail() {
 | |
|       return this.$route.hash == "#add"
 | |
|     }
 | |
|   },
 | |
|   provide() {
 | |
|     let {instance} = this
 | |
|     return {instance}
 | |
|   }
 | |
| }
 | |
| </script>
 | |
| 
 | |
| <style lang="scss" scoped>
 | |
| .AppAccountRole {
 | |
|   height: 100%;
 | |
| }
 | |
| </style>
 |