From d844b486d239d17f7cdc6db91a19691926c5529f Mon Sep 17 00:00:00 2001
From: Coooder-X <55648333+Coooder-X@users.noreply.github.com>
Date: Tue, 26 Jan 2021 13:06:47 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E9=A1=B5=E9=9D=A2=E5=8F=B3=E4=B8=8A?=
=?UTF-8?q?=E8=A7=92header=E5=A2=9E=E5=8A=A0=E4=B8=8B=E6=8B=89=E9=80=89?=
=?UTF-8?q?=E9=A1=B9=E2=80=98API=E6=96=87=E6=A1=A3=E2=80=99=20(#1257)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
在页面右上角header增加下拉选项‘API文档’,点击后浏览器打开新标签,并跳转
---
frontend/src/business/components/common/head/HeaderUser.vue | 4 ++++
frontend/src/i18n/zh-CN.js | 1 +
frontend/src/i18n/zh-TW.js | 1 +
3 files changed, 6 insertions(+)
diff --git a/frontend/src/business/components/common/head/HeaderUser.vue b/frontend/src/business/components/common/head/HeaderUser.vue
index ce11e27682..c096706f44 100644
--- a/frontend/src/business/components/common/head/HeaderUser.vue
+++ b/frontend/src/business/components/common/head/HeaderUser.vue
@@ -8,6 +8,7 @@
{{ $t('commons.personal_information') }}
{{ $t('commons.about_us') }}
{{ $t('commons.help_documentation') }}
+ {{ $t('commons.api_help_documentation') }}
{{ $t('commons.cut_back_old_version') }}
@@ -64,6 +65,9 @@ export default {
case "help":
window.location.href = "https://metersphere.io/docs/index.html";
break;
+ case "ApiHelp":
+ window.open('/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config', "_blank");
+ break;
default:
break;
}
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index 85d73e703d..cf7154389a 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -8,6 +8,7 @@ export default {
comment: '评论',
examples: '示例',
help_documentation: '帮助文档',
+ api_help_documentation: 'API文档',
delete_cancelled: '已取消删除',
workspace: '工作空间',
organization: '组织',
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index 47ede5346e..9c07b711b2 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -8,6 +8,7 @@ export default {
comment: '評論',
examples: '示例',
help_documentation: '幫助文檔',
+ api_help_documentation: 'API文檔',
delete_cancelled: '已取消刪除',
workspace: '工作空間',
organization: '組織',