mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
fix(news): 添加页面跳转
This commit is contained in:
@@ -8,6 +8,12 @@
|
||||
<v-tab value="activity" title="活动" />
|
||||
<v-tab value="news" title="新闻" />
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn class="switch-btn" @click="switchAnno">
|
||||
<template v-slot:prepend>
|
||||
<v-icon>mdi-bullhorn</v-icon>
|
||||
</template>
|
||||
切换游戏内公告
|
||||
</v-btn>
|
||||
<v-text-field
|
||||
v-show="appStore.devMode"
|
||||
v-model="search"
|
||||
@@ -136,6 +142,7 @@
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import TLoading from "../components/t-loading.vue";
|
||||
// tauri
|
||||
import { dialog } from "@tauri-apps/api";
|
||||
@@ -147,7 +154,6 @@ import MysOper from "../plugins/Mys";
|
||||
import { createTGWindow } from "../utils/TGWindow";
|
||||
// interface
|
||||
import { NewsCard, NewsData } from "../plugins/Mys/interface/news";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
// Store
|
||||
const appStore = useAppStore();
|
||||
@@ -189,6 +195,10 @@ onMounted(async () => {
|
||||
loading.value = false;
|
||||
});
|
||||
|
||||
function switchAnno() {
|
||||
router.push("/announcements");
|
||||
}
|
||||
|
||||
// 加载更多
|
||||
async function loadMore(data: string) {
|
||||
loadingSub.value = true;
|
||||
@@ -322,6 +332,15 @@ async function searchPost() {
|
||||
height: 150px;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
/* switch */
|
||||
.switch-btn {
|
||||
font-family: Genshin, serif;
|
||||
background: #ffca0a;
|
||||
height: 40px;
|
||||
margin-right: 10px;
|
||||
margin-top: 5px;
|
||||
color: #546d8b;
|
||||
}
|
||||
/* load more */
|
||||
.load-news {
|
||||
font-family: Genshin, serif;
|
||||
|
||||
Reference in New Issue
Block a user