This commit is contained in:
X1627315083@163.com
2026-05-14 13:08:29 +08:00
parent e54e66c6ae
commit 2ab2466f3d
9 changed files with 593 additions and 73 deletions

View File

@@ -5,24 +5,29 @@ import HomeView from './pages/HomeView.vue'
import ProductsView from './pages/ProductsView.vue'
export const routes: RouteRecordRaw[] = [
{
path: '/',
name: 'home',
component: HomeView,
},
{
path: '/about',
name: 'about',
component: AboutView,
},
{
path: '/products',
name: 'products',
component: ProductsView,
},
{
path: '/contact',
name: 'contact',
component: ContactView,
},
{
path: '/:lang?',
children: [
{
path: '',
component: HomeView,
alias: ['/:lang?', '/:lang?/home'],
},
{
path: 'about',
component: AboutView,
},
{
path: 'products',
name: 'products',
component: ProductsView,
},
{
path: 'contact',
name: 'contact',
component: ContactView,
},
],
},
]