From 0c859957b43d565426381062d03c8e742a24fdc2 Mon Sep 17 00:00:00 2001 From: snowykami Date: Sun, 22 Sep 2024 01:48:53 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20docs:=20=E6=B7=BB=E5=8A=A0=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=8F=92=E4=BB=B6=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/components/ResStore.vue | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/components/ResStore.vue b/docs/components/ResStore.vue index da446baf..3b8d7d75 100644 --- a/docs/components/ResStore.vue +++ b/docs/components/ResStore.vue @@ -7,10 +7,7 @@ import {RepoUrl} from "./scripts/statsApi"; import resourcesJson from "../public/resources.json" import {useData} from "vitepress"; -// formLang -const lang = computed( - () => formatLang(useData().lang.value) -) +// formLan // 从public/assets/resources.json加载插件 let filteredItems = computed(() => { @@ -43,15 +40,15 @@ function closePublishWindow() { isPublishWindowOpen.value = false } +let submitLang = "" +if (formatLang(useData().site.value.lang) === "zh") { + submitLang = "zh" +} else { + submitLang = "en" +} function submitForm() { const title = encodeURI(`Resource: ${newRes.value.name}`) - let submitLang = "" - if (lang.value === "zh") { - submitLang = "zh" - } else { - submitLang = "en" - } const issueURL = `${RepoUrl}/issues/new?assignees=&labels=Resource&template=resource_publish_${submitLang}.yml&title=${title}` console.log(issueURL) window.open(issueURL, '_blank')