feature: TypeScript

This commit is contained in:
Cindy Chang
2024-07-03 12:08:16 +08:00
parent ba4f70213d
commit 1991b4df63
4 changed files with 32 additions and 3 deletions

View File

@@ -10,7 +10,7 @@
</main>
</template>
<script>
<script lang='ts'>
import { onBeforeMount, } from 'vue';
import { useRouter } from 'vue-router';
import { storeToRefs, mapActions, mapState, } from 'pinia';
@@ -41,7 +41,7 @@ export default {
const setHighlightedNavItemOnLanding = () => {
const currentPath = router.currentRoute.value.path;
const pathSegments = currentPath.split('/').filter(segment => segment !== '');
const pathSegments: string[] = currentPath.split('/').filter(segment => segment !== '');
if(pathSegments.length === 1) {
if(pathSegments[0] === 'files') {
pageAdminStore.setActivePage('ALL');