40 lines
		
	
	
		
			644 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			644 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <div class="AppGridBlock">
 | |
|     <component :is="currentPage" :instance="instance" :dict="dict"/>
 | |
|   </div>
 | |
| </template>
 | |
| 
 | |
| <script>
 | |
| import List from "./components/list";
 | |
| import Add from "./components/add";
 | |
| 
 | |
| export default {
 | |
|   name: "AppGridBlock",
 | |
|   label: "网格区块",
 | |
| 
 | |
|   props: {
 | |
|     instance: Function,
 | |
|     dict: Object,
 | |
|   },
 | |
|   computed: {
 | |
|     currentPage() {
 | |
|       return this.$route.hash == "#add" ? Add : List
 | |
|     }
 | |
|   },
 | |
|   data() {
 | |
|     return {
 | |
|       component: "List",
 | |
|     };
 | |
|   },
 | |
|   components: {Add, List},
 | |
| };
 | |
| </script>
 | |
| 
 | |
| <style lang="scss">
 | |
| .AppGridBlock {
 | |
|   height: 100%;
 | |
|   background: #f3f6f9;
 | |
|   overflow: auto;
 | |
| }
 | |
| </style>
 |