Files
MarketGrid/web/src/main.js
T

25 lines
1.0 KiB
JavaScript

import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import naive from 'naive-ui'
import App from './App.vue'
import './styles.css'
import Home from './views/Home.vue'
import Market from './views/Market.vue'
import Buildings from './views/Buildings.vue'
import Tasks from './views/Tasks.vue'
import Results from './views/Results.vue'
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/', name: 'home', component: Home, meta: { title: '工具箱首页' } },
{ path: '/market', name: 'market', component: Market, meta: { title: '市场网格出图' } },
{ path: '/buildings', name: 'buildings', component: Buildings, meta: { title: '楼宇数据查询' } },
{ path: '/tasks', name: 'tasks', component: Tasks, meta: { title: '任务中心' } },
{ path: '/results', name: 'results', component: Results, meta: { title: '成果浏览' } },
{ path: '/:pathMatch(.*)*', redirect: '/' },
],
})
createApp(App).use(router).use(naive).mount('#app')