1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- const index = () => import('@/views/index/index.vue')
- const cases = () => import('@/views/cases/index.vue')
- const services = () => import('@/views/services/index.vue')
- const news = () => import('@/views/news/index.vue')
- const about = () => import('@/views/about/index.vue')
- import { createRouter, createMemoryHistory, createWebHistory } from 'vue-router'
- const routes = [
- {
- path: "/index",
- name: "首页",
- component: index,
- meta: {
- title: "",
- keepAlive: false
- }
- },
- {
- path: "/cases",
- name: "客户案例",
- component: cases,
- meta: {
- title: "",
- keepAlive: false
- }
- },
- {
- path: "/services",
- name: "产品服务",
- component: services,
- meta: {
- title: "",
- keepAlive: false
- }
- },
- {
- path: "/news",
- name: "新闻动态",
- component: news,
- meta: {
- title: "",
- keepAlive: false
- }
- },
- {
- path: "/about",
- name: "关于永天",
- component: about,
- meta: {
- title: "",
- keepAlive: false
- }
- },
- {
- path: "/cases",
- name: "客户案例",
- component: cases,
- meta: {
- title: "",
- keepAlive: false
- }
- },
- ]
- // const router = createRouter({
- // history: import.meta.env.SSR ? createMemoryHistory() : createWebHistory(),
- // routes
- // })
- // export default router
- export function createSSRRouter(){
- return createRouter({
- history: import.meta.env.SSR ? createMemoryHistory() : createWebHistory(),
- routes
- })
- }
|