From 4f050953363b364815a08103047df3fe377d8f56 Mon Sep 17 00:00:00 2001 From: Soybean <2570172956@qq.com> Date: Wed, 22 Sep 2021 10:42:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(projects):=20=E6=B7=BB=E5=8A=A0=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=96=87=E4=BB=B6env=E5=AF=B9=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 6 ++---- .env.production | 4 +--- .env.staging | 3 +++ .../BasicLayout/components/GlobalTab/index.vue | 1 + src/typings/env.d.ts | 12 ++++++++++++ 5 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 .env.staging create mode 100644 src/typings/env.d.ts diff --git a/.env.development b/.env.development index e72288ff..6c697361 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,4 @@ -#请求的环境 测试环境 -VITE_HTTP_ENV=TEST +#请求的环境 +VITE_HTTP_ENV=DEV #请求地址 VITE_HTTP_URL=http://192.168.100.57/ -#emoss-admin服务请求地址 -VITE_HTTP_URL_EMOSS_ADMIN = http://192.168.100.57:8201/emoss-admin diff --git a/.env.production b/.env.production index f9c939b2..2f9a5d81 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,4 @@ #请求的环境 正式环境 -VITE_HTTP_ENV=OFFICAL +VITE_HTTP_ENV=PROD #请求地址 VITE_HTTP_URL=http://119.23.220.176:17321 -#emoss-admin服务请求地址 -VITE_HTTP_URL_EMOSS_ADMIN = http://119.23.220.176:17321/emoss-admin diff --git a/.env.staging b/.env.staging new file mode 100644 index 00000000..b52f0e85 --- /dev/null +++ b/.env.staging @@ -0,0 +1,3 @@ +VITE_HTTP_ENV=STAGING +#请求地址 +VITE_HTTP_URL=http://119.23.220.176:17321 diff --git a/src/layouts/BasicLayout/components/GlobalTab/index.vue b/src/layouts/BasicLayout/components/GlobalTab/index.vue index 0a5438ee..4059dc58 100644 --- a/src/layouts/BasicLayout/components/GlobalTab/index.vue +++ b/src/layouts/BasicLayout/components/GlobalTab/index.vue @@ -31,6 +31,7 @@ :closable="item.name !== ROUTE_HOME.name" @click="handleClickTab(item.fullPath)" @close="removeMultiTab(item.fullPath)" + @contextmenu="handleContextMenu($event, item.fullPath)" > {{ item.meta?.title }} diff --git a/src/typings/env.d.ts b/src/typings/env.d.ts new file mode 100644 index 00000000..46d58517 --- /dev/null +++ b/src/typings/env.d.ts @@ -0,0 +1,12 @@ +interface ImportMetaEnv { + /** 项目标题 */ + VITE_APP_TITLE: string; + /** 项目标题(文本) */ + VITE_APP_TITLE_LABEL: string; + /** 项目基本地址 */ + VITE_BASE_URL: string; + /** 网路请求环境类型 */ + VITE_HTTP_ENV: string; + /** 网路请求地址 */ + VITE_HTTP_URL: string; +}