排行榜显示下一个榜单名称,优化一键分享功能

pull/361/head
HXY 2 years ago
parent ccdc97b997
commit 485584c011

@ -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<MentionOption[]>([]);
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];

@ -92,7 +92,7 @@
<div class="ranking-header">
<div class="ranking-title">{{ rankingTitles[currentRankingType] }}</div>
<div class="toggle-button" @click="toggleRankingType">
<n-icon :component="ChevronForward" />
{{ rankingTitles[NextRankingType] }} <n-icon :component="ChevronForward" />
</div>
</div>
<n-spin :show="rankloading">
@ -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月

Loading…
Cancel
Save