Browse Source

fix: 解决 login 背景打包后消失的问题

奔跑的面条 3 years ago
parent
commit
fcdc26e9eb
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/views/login/index.vue
  2. 1 1
      vite.config.ts

+ 1 - 1
src/views/login/index.vue

@@ -315,7 +315,7 @@ $carousel-image-height: 60vh;
     align-items: center;
     width: 100vw;
     height: 100vh;
-    background: url('../../assets/images/login/login-bg.png') no-repeat 0 -120px;
+    background: url('@/assets/images/login/login-bg.png') no-repeat 0 -120px;
     .bg-slot {
       width: $carousel-width;
     }

+ 1 - 1
vite.config.ts

@@ -10,7 +10,7 @@ function pathResolve(dir: string) {
 }
 
 export default defineConfig({
-  base: './',
+  base: '/',
   // 路径重定向
   resolve: {
     alias: [