mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
✏️ 修复 IDE import 报错
This commit is contained in:
@@ -38,7 +38,8 @@
|
||||
<!-- 右侧内容-->
|
||||
<div class="right-wrap">
|
||||
<div v-if="curCardName !== '' && selectedSeries !== -1 && !loading">
|
||||
<TopNamecard :data="curCard" @selected="openImg()" />
|
||||
<!-- todo,这边用 v-if 包装,需要经过测试 -->
|
||||
<TopNamecard :data="curCard" @selected="openImg()" v-if="curCard" />
|
||||
</div>
|
||||
<div
|
||||
v-for="(achievement, index) in renderSelect"
|
||||
@@ -109,23 +110,23 @@ import { dialog, fs, path } from "@tauri-apps/api";
|
||||
import { computed, nextTick, onMounted, ref } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import showConfirm from "../../components/func/confirm.js";
|
||||
import showSnackbar from "../../components/func/snackbar.js";
|
||||
import ToAchiInfo from "../../components/overlay/to-achiInfo.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import ToNamecard from "../../components/overlay/to-namecard.vue";
|
||||
import TopNamecard from "../../components/overlay/top-namecard.vue";
|
||||
import { AppAchievementSeriesData, AppNameCardsData } from "../../data";
|
||||
import { AppAchievementSeriesData, AppNameCardsData } from "../../data/index.js";
|
||||
import TSUserAchi from "../../plugins/Sqlite/modules/userAchi.js";
|
||||
import { useAchievementsStore } from "../../store/modules/achievements";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { getNowStr } from "../../utils/toolFunc";
|
||||
import { useAchievementsStore } from "../../store/modules/achievements.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import { getNowStr } from "../../utils/toolFunc.js";
|
||||
import {
|
||||
getUiafHeader,
|
||||
readUiafData,
|
||||
verifyUiafData,
|
||||
verifyUiafDataClipboard,
|
||||
} from "../../utils/UIAF";
|
||||
} from "../../utils/UIAF.js";
|
||||
|
||||
// Store
|
||||
const achievementsStore = useAchievementsStore();
|
||||
@@ -224,7 +225,7 @@ async function selectSeries(index: number): Promise<void> {
|
||||
selectedSeries.value = index;
|
||||
selectedAchievement.value = await getAchiData("series", index.toString());
|
||||
loadingTitle.value = "正在查找对应的成就名片";
|
||||
curCardName.value = await TSUserAchi.getSeriesNameCard(index);
|
||||
curCardName.value = await TSUserAchi.getSeriesNameCard(String(index));
|
||||
if (curCardName.value !== "") {
|
||||
curCard.value = AppNameCardsData.find((item) => item.name === curCardName.value);
|
||||
}
|
||||
|
||||
@@ -57,12 +57,12 @@ import { nextTick, onMounted, ref, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { AnnoLang, AnnoServer } from "../../web/request/getAnno";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import TGUtils from "../../web/utils/TGUtils";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import { createTGWindow } from "../../utils/TGWindow.js";
|
||||
import { AnnoLang, AnnoServer } from "../../web/request/getAnno.js";
|
||||
import TGRequest from "../../web/request/TGRequest.js";
|
||||
import TGUtils from "../../web/utils/TGUtils.js";
|
||||
|
||||
// 服务器名称-服务器对应
|
||||
type AnnoServerMap = {
|
||||
|
||||
@@ -94,19 +94,19 @@ import TcAppBadge from "../../components/config/tc-appBadge.vue";
|
||||
import TcDataDir from "../../components/config/tc-dataDir.vue";
|
||||
import TcInfo from "../../components/config/tc-info.vue";
|
||||
import TcUserBadge from "../../components/config/tc-userBadge.vue";
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import showConfirm from "../../components/func/confirm.js";
|
||||
import showSnackbar from "../../components/func/snackbar.js";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import TSUserAchi from "../../plugins/Sqlite/modules/userAchi.js";
|
||||
import { useAchievementsStore } from "../../store/modules/achievements";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { useHomeStore } from "../../store/modules/home";
|
||||
import { backUpUserData, restoreUserData } from "../../utils/dataBS";
|
||||
import { getBuildTime } from "../../utils/TGBuild";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { bytesToSize, getCacheDir, getDeviceInfo, getRandomString } from "../../utils/toolFunc";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import { useAchievementsStore } from "../../store/modules/achievements.js";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
import { useHomeStore } from "../../store/modules/home.js";
|
||||
import { backUpUserData, restoreUserData } from "../../utils/dataBS.js";
|
||||
import { getBuildTime } from "../../utils/TGBuild.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import { bytesToSize, getCacheDir, getDeviceInfo, getRandomString } from "../../utils/toolFunc.js";
|
||||
import TGRequest from "../../web/request/TGRequest.js";
|
||||
|
||||
// Store
|
||||
const appStore = useAppStore();
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted, ref, shallowRef } from "vue";
|
||||
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import showSnackbar from "../../components/func/snackbar.js";
|
||||
import TCalendar from "../../components/home/t-calendar.vue";
|
||||
import TPool from "../../components/home/t-pool.vue";
|
||||
import TPosition from "../../components/home/t-position.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { useHomeStore } from "../../store/modules/home";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
import { useHomeStore } from "../../store/modules/home.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
|
||||
// store
|
||||
const appStore = useAppStore();
|
||||
|
||||
@@ -47,15 +47,15 @@
|
||||
import { nextTick, onMounted, ref, watch } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import showSnackbar from "../../components/func/snackbar.js";
|
||||
import TPostCard from "../../components/main/t-postcard.vue";
|
||||
import ToChannel from "../../components/overlay/to-channel.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import ToPostSearch from "../../components/post/to-postSearch.vue";
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { createPost } from "../../utils/TGWindow";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import { createPost } from "../../utils/TGWindow.js";
|
||||
|
||||
// 类型定义
|
||||
enum NewsType {
|
||||
|
||||
@@ -95,16 +95,16 @@ import { UnlistenFn } from "@tauri-apps/api/helpers/event";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onBeforeMount, onMounted, onUnmounted, ref, watch } from "vue";
|
||||
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import showConfirm from "../../components/func/confirm.js";
|
||||
import showSnackbar from "../../components/func/snackbar.js";
|
||||
import TPostCard from "../../components/main/t-postcard.vue";
|
||||
import ToCollectPost from "../../components/overlay/to-collectPost.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import TSUserCollection from "../../plugins/Sqlite/modules/userCollect";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import TSUserCollection from "../../plugins/Sqlite/modules/userCollect.js";
|
||||
import { useUserStore } from "../../store/modules/user.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import TGRequest from "../../web/request/TGRequest.js";
|
||||
|
||||
const loading = ref(false);
|
||||
const loadingTitle = ref("加载中...");
|
||||
|
||||
@@ -56,15 +56,15 @@
|
||||
<script setup lang="ts">
|
||||
import { nextTick, onMounted, ref, watch } from "vue";
|
||||
|
||||
import showConfirm from "../../components/func/confirm";
|
||||
import showSnackbar from "../../components/func/snackbar";
|
||||
import showConfirm from "../../components/func/confirm.js";
|
||||
import showSnackbar from "../../components/func/snackbar.js";
|
||||
import TPostCard from "../../components/main/t-postcard.vue";
|
||||
import ToLoading from "../../components/overlay/to-loading.vue";
|
||||
import ToPostSearch from "../../components/post/to-postSearch.vue";
|
||||
import Mys from "../../plugins/Mys";
|
||||
import TGClient from "../../utils/TGClient";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { createPost } from "../../utils/TGWindow";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import TGClient from "../../utils/TGClient.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import { createPost } from "../../utils/TGWindow.js";
|
||||
|
||||
const loading = ref<boolean>(true);
|
||||
const loadingTitle = ref<string>("正在加载数据");
|
||||
@@ -282,6 +282,8 @@ async function freshPostData(): Promise<void> {
|
||||
|
||||
function freshCurForum(newVal: string): void {
|
||||
const forum = forumList[curGameLabel.value];
|
||||
// todo,这边需要优化逻辑以经过测试,目前暂时ignore
|
||||
// @ts-expect-error-next-line Vue: Element implicitly has an any type because expression of type string can't be used to index type
|
||||
curForum.value = forum[newVal];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user