From 485584c0118429a319155fe4d21c8fe2c6b248b9 Mon Sep 17 00:00:00 2001 From: HXY <2479895356@qq.com> Date: Tue, 29 Aug 2023 15:54:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=A6=9C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E4=B8=AA=E6=A6=9C=E5=8D=95=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E4=B8=80=E9=94=AE=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/compose.vue | 8 +++++++- web/src/components/rightbar.vue | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/web/src/components/compose.vue b/web/src/components/compose.vue index d29f096a..3c43927f 100644 --- a/web/src/components/compose.vue +++ b/web/src/components/compose.vue @@ -294,6 +294,7 @@ import { isZipFile } from '@/utils/isZipFile'; import type { MentionOption, UploadFileInfo, UploadInst } from 'naive-ui'; import { VisibilityEnum, PostItemTypeEnum } from '@/utils/IEnum'; import { userLogin, userRegister, userInfo } from '@/api/auth'; +import { useRouter } from "vue-router"; @@ -302,6 +303,7 @@ const emit = defineEmits<{ }>(); const store = useStore(); +const router = useRouter(); const optionsRef = ref([]); const loading = ref(false); @@ -684,6 +686,10 @@ const submitPost = () => { videoContents.value = []; attachmentContents.value = []; visitType.value = defaultVisitType.value; + //转到初始页面 + router.push({ + name: 'home', + }); }) .catch((err) => { submitting.value = false; @@ -745,7 +751,7 @@ onMounted(() => { loading.value = false; }); } - contentValue.value = parts[0] + "\n\n" + "今天探索Aimo新发现了一端有趣的c#代码\n\n" + + contentValue.value = parts[0] + " \n\n" + "今天探索Aimo新发现了一端有趣的c#代码" + " \n\n" + "名字:\n " + parts[1] + "\n" + "介绍:\n " + parts[2] + "\n" + "分享码:\n " + parts[3]; diff --git a/web/src/components/rightbar.vue b/web/src/components/rightbar.vue index 77c1100d..8b04545e 100644 --- a/web/src/components/rightbar.vue +++ b/web/src/components/rightbar.vue @@ -92,7 +92,7 @@
{{ rankingTitles[currentRankingType] }}
- 切换 + {{ rankingTitles[NextRankingType] }}
@@ -223,10 +223,12 @@ const rankingTitles: { [key: string]: string } = { const rankingTypes = ['highQuality', 'downloadPreWeek', 'downloadPreMonth', 'downloadAll']; let currentRankingTypeIndex = 0; const currentRankingType = ref("highQuality"); +const NextRankingType = ref("downloadPreWeek"); const toggleRankingType = () => { currentRankingTypeIndex = (currentRankingTypeIndex + 1) % rankingTypes.length; currentRankingType.value = rankingTypes[currentRankingTypeIndex]; + NextRankingType.value = rankingTypes[(currentRankingTypeIndex + 1) % rankingTypes.length]; }; //1总 2周 3月