From 43a00c78bed78ec0701d1f21714c6f4f9dde560d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Fri, 8 Oct 2021 21:22:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E5=90=8Dkey=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Vue/.env.development | 6 ++---- ZR.Vue/.env.production | 2 +- ZR.Vue/src/router/index.js | 3 ++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ZR.Vue/.env.development b/ZR.Vue/.env.development index b6be2a4..2028595 100644 --- a/ZR.Vue/.env.development +++ b/ZR.Vue/.env.development @@ -1,11 +1,9 @@ +# 关于此文件说明 必须以VUE_APP开头 # 开发环境配置 ENV = 'development' # ZR管理系统/开发环境 VUE_APP_BASE_API = 'http://localhost:8888/' -# 路由懒加载 -VUE_CLI_BABEL_TRANSPILE_MODULES = true - # 路由前缀 -VUE_ROUTER_PREFIX = '/' +VUE_APP_ROUTER_PREFIX = '' diff --git a/ZR.Vue/.env.production b/ZR.Vue/.env.production index 08c684f..dc272e2 100644 --- a/ZR.Vue/.env.production +++ b/ZR.Vue/.env.production @@ -5,4 +5,4 @@ ENV = 'production' VUE_APP_BASE_API = '/prod-api' # 路由前缀 -VUE_ROUTER_PREFIX = '/' +VUE_APP_ROUTER_PREFIX = '' diff --git a/ZR.Vue/src/router/index.js b/ZR.Vue/src/router/index.js index b2aa8da..bec7dfb 100644 --- a/ZR.Vue/src/router/index.js +++ b/ZR.Vue/src/router/index.js @@ -110,6 +110,7 @@ export const constantRoutes = [ export default new Router({ mode: 'history', // 去掉url中的# - scrollBehavior: () => ({ y: 0 }), + // base: '', + // scrollBehavior: () => ({ y: 0 }), routes: constantRoutes })