update
This commit is contained in:
parent
b80bb344ea
commit
7c6a28b98d
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<main class="flex-1 px-2 py-2 sm:px-4 md:px-6 sm:py-4 md:py-6">
|
||||
<div v-if="route.path !== '/'" class="mx-auto max-w-7xl">
|
||||
<div v-if="route.path !== '/home'" class="mx-auto max-w-7xl">
|
||||
<h1 class="text-lg font-medium md:text-2xl lg:text-3xl text-dark">{{ currentRouteName }}</h1>
|
||||
</div>
|
||||
<div class="my-2 sm:my-4">
|
||||
@ -10,12 +10,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
// Dapatkan objek route dari vue-router
|
||||
const route = useRoute();
|
||||
const route = useRoute()
|
||||
|
||||
// Dapatkan nama rute menggunakan computed property
|
||||
const currentRouteName = computed(() => route.name);
|
||||
const currentRouteName = computed(() => route.name)
|
||||
</script>
|
@ -1,12 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import Aside from '@/components/AsideWhite.vue';
|
||||
import Header from '@/components/Header.vue';
|
||||
import Aside from '@/components/AsideWhite.vue'
|
||||
import Header from '@/components/Header.vue'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const sideBarStatus = ref(false)
|
||||
|
||||
function handleChangeSideBarStatus(status: boolean) {
|
||||
sideBarStatus.value = status;
|
||||
const handleChangeSideBarStatus = (status: boolean) => {
|
||||
sideBarStatus.value = status
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -306,16 +306,6 @@ const router = createRouter({
|
||||
name: 'Not Found',
|
||||
component: NotFoundView
|
||||
},
|
||||
{
|
||||
path: '/profile',
|
||||
name: 'Profile',
|
||||
redirect: '/404',
|
||||
},
|
||||
{
|
||||
path: '/settings',
|
||||
name: 'Settings',
|
||||
redirect: '/404',
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user