30 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|     <main
 | |
|         class="flex flex-col justify-between flex-1 px-4 overflow-y-auto bg-white md:mr-3 sm:px-3 md:px-6 rounded-t-2xl md:rounded-t-3xl no-scroll-bar">
 | |
|         <div v-if="route.path !== '/home'" class="mt-4 lg:mt-6 max-w-7xl">
 | |
|             <h1 class="text-xl font-semibold md:text-3xl text-dark">{{ pageTitle }}</h1>
 | |
|         </div>
 | |
|         <div class="flex-1 mt-2 sm:mt-4 dx-viewport">
 | |
|             <Filters :report-button="filters.config.reportButton" class="mb-4" v-if="filters.config.component">
 | |
|                 <component :is="filters.config.component" />
 | |
|             </Filters>
 | |
| 
 | |
|             <slot></slot>
 | |
|         </div>
 | |
|     </main>
 | |
| </template>
 | |
| 
 | |
| <script setup lang="ts">
 | |
| import { computed } from 'vue'
 | |
| import { useRoute } from 'vue-router'
 | |
| import { useFiltersStore } from '@/stores/filters';
 | |
| 
 | |
| import Filters from '../Form/Filters.vue'
 | |
| 
 | |
| // Dapatkan objek route dari vue-router
 | |
| const route = useRoute()
 | |
| 
 | |
| // Dapatkan nama rute menggunakan computed property
 | |
| const pageTitle = computed(() => route.name)
 | |
| const filters = useFiltersStore()
 | |
| </script> |