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