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月