rourtes
This commit is contained in:
11
src/main.ts
11
src/main.ts
@@ -1,18 +1,9 @@
|
||||
import { createApp } from 'vue';
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
import App from './App.vue';
|
||||
import { routes } from './routes';
|
||||
import './style.css';
|
||||
|
||||
const routes = [
|
||||
{ path: '/', component: () => import('@/pages/Index.vue') },
|
||||
{ path: '/reprocess', component: () => import('@/pages/Reprocess.vue') },
|
||||
{ path: '/market', component: () => import('@/pages/Market.vue'), children: [
|
||||
{ path: '', redirect: '/market/scan' },
|
||||
{ path: 'scan', component: () => import('@/pages/market/Scan.vue') },
|
||||
] },
|
||||
{ path: '/tools', component: () => import('@/pages/Tools.vue') },
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
|
||||
@@ -19,7 +19,7 @@ import { RouterLink, RouterView } from 'vue-router';
|
||||
|
||||
<style scoped>
|
||||
a.tab {
|
||||
@apply flex items-center p-2 me-2 rounded-t-md bg-slate-600 hover:bg-slate-700;
|
||||
@apply flex items-center px-4 me-2 rounded-t-md bg-slate-600 hover:bg-slate-700;
|
||||
&.router-link-active {
|
||||
@apply bg-emerald-500 hover:bg-emerald-700;
|
||||
}
|
||||
|
||||
6
src/pages/market/Track.vue
Normal file
6
src/pages/market/Track.vue
Normal file
@@ -0,0 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
12
src/routes.ts
Normal file
12
src/routes.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
export const routes: RouteRecordRaw[] = [
|
||||
{ path: '/', component: () => import('@/pages/Index.vue') },
|
||||
{ path: '/reprocess', component: () => import('@/pages/Reprocess.vue') },
|
||||
{ path: '/market', component: () => import('@/pages/Market.vue'), children: [
|
||||
{ path: '', redirect: '/market/scan' },
|
||||
{ path: 'scan', component: () => import('@/pages/market/Scan.vue') },
|
||||
{ path: 'track', component: () => import('@/pages/market/Track.vue') },
|
||||
] },
|
||||
{ path: '/tools', component: () => import('@/pages/Tools.vue') },
|
||||
];
|
||||
Reference in New Issue
Block a user