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