Skip to content

Commit

Permalink
fix: 相对路径问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglu committed Mar 31, 2022
1 parent 091ab39 commit 227bf90
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions public/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/assets/favicon.17e50649.svg" />
<link rel="icon" type="image/svg+xml" href="/admin/assets/favicon.17e50649.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<script type="module" crossorigin src="/assets/index.e34ef120.js"></script>
<link rel="stylesheet" href="/assets/index.dc4c9e4e.css">
<title>Van Nav</title>
<script type="module" crossorigin src="/admin/assets/index.d7e9122d.js"></script>
<link rel="stylesheet" href="/admin/assets/index.dc4c9e4e.css">
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion ui/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/assets/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<title>Van Nav</title>
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion ui/admin/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function App() {
return (
<ConfigProvider locale={zhCN}>
<GlobalContext.Provider value={{ store, setStore, reload, loading }}>
<Router>
<Router basename="/admin">
<Routes>
<Route
path="/"
Expand Down
3 changes: 2 additions & 1 deletion ui/admin/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default defineConfig({
changeOrigin: true
},
},
port: 6411
port: 6411,
base: '/admin/'
}
})

0 comments on commit 227bf90

Please sign in to comment.