sbj пре 2 година
родитељ
комит
488d1bd54a
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 1 1
      src/router/index.js
  2. 2 1
      vue.config.js

+ 1 - 1
src/router/index.js

@@ -47,7 +47,7 @@ export const defaultRoutes = [
 
 
 const router = createRouter({
 const router = createRouter({
   routes:defaultRoutes,
   routes:defaultRoutes,
- 
+  base: '/ghjg-digital-twin', // 打包发布时Tomcat中webapp下的项目路径
   history:createWebHashHistory()
   history:createWebHashHistory()
  
  
 })
 })

+ 2 - 1
vue.config.js

@@ -2,5 +2,6 @@ const { defineConfig } = require('@vue/cli-service')
 
 
 module.exports = defineConfig({
 module.exports = defineConfig({
   transpileDependencies: true,
   transpileDependencies: true,
-  lintOnSave:false
+  lintOnSave:false,
+  publicPath: '/ghjg-digital-twin', //打包发布用
 })
 })