mirror of
https://git.um-react.app/um/um-react.git
synced 2026-08-27 03:42:00 +00:00
Compare commits
2 Commits
a11caaae92
...
3059f495ab
| Author | SHA1 | Date | |
|---|---|---|---|
| 3059f495ab | |||
| 024847a45a |
@@ -9,6 +9,10 @@
|
|||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<link rel="apple-touch-icon" href="/pwa-512x512.png" sizes="512x512" />
|
<link rel="apple-touch-icon" href="/pwa-512x512.png" sizes="512x512" />
|
||||||
<meta name="theme-color" content="#4DBA87" />
|
<meta name="theme-color" content="#4DBA87" />
|
||||||
|
<script>
|
||||||
|
// 设置基础路径,如果希望部署在/music-unlock/,则改为 '/music-unlock/',默认部署在根路径
|
||||||
|
window.BASE_URL = '/';
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function AppRoot() {
|
|||||||
useEffect(() => persistSettings(store), []);
|
useEffect(() => persistSettings(store), []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BrowserRouter>
|
<BrowserRouter basename={window.BASE_URL || '/'}>
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<div role="tablist" className="tabs tabs-border w-full justify-center border-b-2 border-base-200 box-content">
|
<div role="tablist" className="tabs tabs-border w-full justify-center border-b-2 border-base-200 box-content">
|
||||||
<NavLink to="/" role="tab" className={tabClassNames}>
|
<NavLink to="/" role="tab" className={tabClassNames}>
|
||||||
|
|||||||
Vendored
+4
@@ -17,3 +17,7 @@ declare module '*&mac-command' {
|
|||||||
export const commandName: string;
|
export const commandName: string;
|
||||||
export const tarName: string;
|
export const tarName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare interface Window {
|
||||||
|
BASE_URL: string;
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ const version = `${pkg.version} (${shortCommit})`;
|
|||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
base: './',
|
||||||
worker: {
|
worker: {
|
||||||
format: 'es',
|
format: 'es',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user