Commit a0b1ca29 authored by tyyin lan's avatar tyyin lan

build: 基础路由路径调整

parent 0a7890b0
......@@ -13,11 +13,13 @@ export interface MenuOption {
}
export function getHistoryMode(modeString: ViteEnv['VITE_ROUTER_MODE']): RouterHistory {
const PUBLIC_PATH = import.meta.env.VITE_PUBLIC_PATH
if (modeString === 'h5') {
return createWebHistory()
return createWebHistory(PUBLIC_PATH)
}
return createWebHashHistory()
return createWebHashHistory(PUBLIC_PATH)
}
function menuSort(routes: RouteRecordRaw[]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment