Browse Source

feat: 轨迹自动定位调整

zhangjie 1 month ago
parent
commit
b5a06067a8
2 changed files with 3 additions and 2 deletions
  1. 1 1
      src/features/mark/MarkDrawTrack.vue
  2. 2 1
      vite.config.ts

+ 1 - 1
src/features/mark/MarkDrawTrack.vue

@@ -123,7 +123,7 @@ watch(
             find?.offsetY || topTrack.offsetY
           }-${find?.offsetX || topTrack.offsetX}`
         )
-        ?.scrollIntoView({ behavior: "smooth", block: "center" });
+        ?.parentElement.scrollIntoView({ behavior: "smooth", block: "start" });
     }
   },
   {

+ 2 - 1
vite.config.ts

@@ -21,7 +21,8 @@ function mockDevLogin(): Plugin {
 
 // https://vitejs.dev/config/
 export default defineConfig({
-  base: env.NODE_ENV === "development" ? env.VUE_APP_DEV_BASE_URL : undefined,
+  // base: env.NODE_ENV === "development" ? env.VUE_APP_DEV_BASE_URL : undefined,
+  base: "/web/",
   plugins: [
     vue({
       reactivityTransform: true,