From ff8e8c59489c5295536c00047f48a8f487f256f2 Mon Sep 17 00:00:00 2001 From: narasux Date: Wed, 5 Mar 2025 16:03:56 +0800 Subject: [PATCH] feat: repoUrl as href --- .../dev-center/sandbox/comps/config-info.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/webfe/package_vue/src/views/dev-center/sandbox/comps/config-info.vue b/webfe/package_vue/src/views/dev-center/sandbox/comps/config-info.vue index eb5a24aaab..e55ee8ea57 100644 --- a/webfe/package_vue/src/views/dev-center/sandbox/comps/config-info.vue +++ b/webfe/package_vue/src/views/dev-center/sandbox/comps/config-info.vue @@ -7,11 +7,17 @@
{{ $t('代码仓库') }}:
-
{{ repoUrl }}
+
+ {{ repoUrl }} +
{{ $t('代码分支') }}:
-
{{ repoBranch }}
+
{{ repoBranch }} + + + +
{{ $t('增强服务') }}:
@@ -74,6 +80,13 @@ export default { repoBranch() { return this.data?.repo?.version_info?.version_name || "--" }, + repoBranchUrl() { + if (this.repoUrl === "--" || this.repoBranch === "--") { + return "--" + } + + return `${this.repoUrl.replace(/\.git$/, '')}/tree/${encodeURIComponent(this.repoBranch)}` + }, envVarLength() { return Object.keys(this.data?.env_vars || {})?.length; },