Browse Source

修改路由模式

master 合并到了海拉
刘忱 1 year ago
parent
commit
6b33ad88d2
  1. 4
      src/router/index.ts

4
src/router/index.ts

@ -1,11 +1,11 @@
import type { App } from 'vue'
import type { RouteRecordRaw } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'
import { createRouter, createWebHistory } from 'vue-router'
import remainingRouter from './modules/remaining'
// 创建路由实例
const router = createRouter({
history: createWebHashHistory(), // createWebHashHistory URL带#,createWebHistory URL不带#
history: createWebHistory(), // createWebHashHistory URL带#,createWebHistory URL不带#
strict: true,
routes: remainingRouter as RouteRecordRaw[],
scrollBehavior: () => ({ left: 0, top: 0 })

Loading…
Cancel
Save