路由模式更新

This commit is contained in:
赵正易 2024-06-25 14:37:40 +08:00
parent ad64831842
commit addf986b86

View File

@ -1,29 +1,31 @@
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
// import Layout from '../components/HelloWorld.vue'
import { createRouter, createWebHistory,createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Home from '@/views/Home/index.vue'
import CallHandle from '@/views/CallHandle/index.vue'
import Signin from '@/views/Signin/index.vue'
const routes : Array<RouteRecordRaw> = [
{
//路由初始指向
path: '/',
name: 'Home',
component: () => import('@/views/Home/index.vue'),
component: Home,
},
{
//呼叫
path: '/callHandle',
name: 'CallHandle',
component: () => import('@/views/CallHandle/index.vue'),
component: CallHandle,
},
{
//签到
path: '/signIn',
name: 'Signin',
component: () => import('@/views/Signin/index.vue'),
component: Signin,
}
]
const router = createRouter({
history: createWebHistory(),
history: createWebHashHistory(),
routes
})