mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-02 06:45:08 +08:00
✏️ 修复 IDE import 报错
This commit is contained in:
@@ -243,15 +243,15 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { event, window as TauriWindow } from "@tauri-apps/api";
|
||||
import { UnlistenFn } from "@tauri-apps/api/helpers/event";
|
||||
import { UnlistenFn, Event } from "@tauri-apps/api/helpers/event";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, onUnmounted, ref, watch } from "vue";
|
||||
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import mhyClient from "../../utils/TGClient";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
import { useUserStore } from "../../store/modules/user.js";
|
||||
import mhyClient from "../../utils/TGClient.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
|
||||
const appStore = useAppStore();
|
||||
const userStore = storeToRefs(useUserStore());
|
||||
@@ -298,8 +298,8 @@ function collapse(): void {
|
||||
let themeListener: UnlistenFn;
|
||||
|
||||
onMounted(async () => {
|
||||
themeListener = await event.listen("readTheme", (e) => {
|
||||
const theme = <string>e.payload;
|
||||
themeListener = await event.listen("readTheme", (e: Event<string>) => {
|
||||
const theme = e.payload;
|
||||
themeGet.value = theme === "default" ? "default" : "dark";
|
||||
});
|
||||
if (TauriWindow.getCurrent().label === "TeyvatGuide") {
|
||||
@@ -329,9 +329,7 @@ function login(): void {
|
||||
});
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
themeListener();
|
||||
});
|
||||
onUnmounted(() => themeListener());
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { event } from "@tauri-apps/api";
|
||||
import { UnlistenFn } from "@tauri-apps/api/helpers/event";
|
||||
import { UnlistenFn, Event } from "@tauri-apps/api/helpers/event";
|
||||
import { computed, onMounted, onUnmounted } from "vue";
|
||||
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
|
||||
const appStore = useAppStore();
|
||||
const themeGet = computed({
|
||||
@@ -35,17 +35,13 @@ async function switchTheme(): Promise<void> {
|
||||
}
|
||||
|
||||
async function listenOnTheme(): Promise<UnlistenFn> {
|
||||
return await event.listen<string>("readTheme", (e) => {
|
||||
return await event.listen("readTheme", (e: Event<string>) => {
|
||||
const theme = e.payload;
|
||||
themeGet.value = theme === "default" ? "default" : "dark";
|
||||
});
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
if (themeListener) {
|
||||
themeListener();
|
||||
}
|
||||
});
|
||||
onUnmounted(() => themeListener());
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.switch-box {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
import { app } from "@tauri-apps/api";
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
|
||||
const appStore = useAppStore();
|
||||
const versionApp = ref<string>();
|
||||
|
||||
@@ -43,13 +43,14 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { dialog, fs, path } from "@tauri-apps/api";
|
||||
import { FileEntry } from "@tauri-apps/api/fs";
|
||||
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { backUpUserData } from "../../utils/dataBS";
|
||||
import TGShell from "../../utils/TGShell";
|
||||
import showConfirm from "../func/confirm";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
import { backUpUserData } from "../../utils/dataBS.js";
|
||||
import TGShell from "../../utils/TGShell.js";
|
||||
import showConfirm from "../func/confirm.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
@@ -127,7 +128,7 @@ async function confirmCLD(): Promise<void> {
|
||||
}
|
||||
const logDir = appStore.logDir;
|
||||
const files = await fs.readDir(logDir);
|
||||
const delFiles = files.filter((file) => {
|
||||
const delFiles = files.filter((file: FileEntry) => {
|
||||
// yyyy-mm-dd.log
|
||||
const reg = /(\d{4}-\d{2}-\d{2}\.log)/;
|
||||
const match = file.path.match(reg);
|
||||
|
||||
@@ -17,19 +17,19 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { event, window as windowTauri } from "@tauri-apps/api";
|
||||
import type { UnlistenFn } from "@tauri-apps/api/helpers/event";
|
||||
import type { UnlistenFn, Event } from "@tauri-apps/api/helpers/event";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { onMounted, onUnmounted, ref, watch } from "vue";
|
||||
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import TGClient from "../../utils/TGClient";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { getDeviceFp } from "../../web/request/getDeviceFp";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import showConfirm from "../func/confirm";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
import { useUserStore } from "../../store/modules/user.js";
|
||||
import TGClient from "../../utils/TGClient.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import { getDeviceFp } from "../../web/request/getDeviceFp.js";
|
||||
import TGRequest from "../../web/request/TGRequest.js";
|
||||
import showConfirm from "../func/confirm.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import ToGameLogin from "../overlay/to-gameLogin.vue";
|
||||
|
||||
interface TcUserBadgeEmits {
|
||||
@@ -77,7 +77,7 @@ async function toWebLogin(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
await TGClient.open("config_sign_in", "https://user.mihoyo.com");
|
||||
signListener = await event.listen("config_user_sign", async (e) => {
|
||||
signListener = await event.listen("config_user_sign", async (e: Event<unknown>) => {
|
||||
if (typeof e.payload !== "string") {
|
||||
showSnackbar({
|
||||
color: "error",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUpdated, ref } from "vue";
|
||||
|
||||
import { saveImgLocal } from "../../utils/TGShare";
|
||||
import { saveImgLocal } from "../../utils/TGShare.js";
|
||||
|
||||
interface DucDetailOlbProps {
|
||||
modelValue: TGApp.Sqlite.Character.RoleConstellation[];
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUpdated, ref } from "vue";
|
||||
|
||||
import { saveImgLocal } from "../../utils/TGShare";
|
||||
import { saveImgLocal } from "../../utils/TGShare.js";
|
||||
|
||||
interface DucDetailOrtProps {
|
||||
modelValue: TGApp.Sqlite.Character.RoleTalent[];
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, onUpdated, ref } from "vue";
|
||||
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import { generateShareImg } from "../../utils/TGShare.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
import DucDetailOlb from "./duc-detail-olb.vue";
|
||||
|
||||
@@ -123,7 +123,7 @@ function loadData(): void {
|
||||
star4List.value.push({
|
||||
...item,
|
||||
gachaCount: reset4count.value,
|
||||
icon: getIcon(item.itemId, item.type),
|
||||
icon: getIcon(item.itemId),
|
||||
});
|
||||
reset4count.value = 0;
|
||||
} else if (item.rank === "5") {
|
||||
@@ -131,7 +131,7 @@ function loadData(): void {
|
||||
star5List.value.push({
|
||||
...item,
|
||||
gachaCount: reset5count.value,
|
||||
icon: getIcon(item.itemId, item.type),
|
||||
icon: getIcon(item.itemId),
|
||||
});
|
||||
reset5count.value = 0;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import { CanvasRenderer } from "echarts/renderers";
|
||||
import { onMounted, provide } from "vue";
|
||||
import VChart, { THEME_KEY } from "vue-echarts";
|
||||
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
// echarts
|
||||
|
||||
use([
|
||||
|
||||
@@ -54,11 +54,11 @@
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { AppGachaData, AppCharacterData, AppWeaponData } from "../../data";
|
||||
import { createPost } from "../../utils/TGWindow";
|
||||
import { timestampToDate } from "../../utils/toolFunc";
|
||||
import showConfirm from "../func/confirm";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { AppGachaData, AppCharacterData, AppWeaponData } from "../../data/index.js";
|
||||
import { createPost } from "../../utils/TGWindow.js";
|
||||
import { timestampToDate } from "../../utils/toolFunc.js";
|
||||
import showConfirm from "../func/confirm.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||
|
||||
interface GroHistoryMap {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
import { onBeforeMount, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import TSAvatarBirth from "../../plugins/Sqlite/modules/avatarBirth";
|
||||
import TSAvatarBirth from "../../plugins/Sqlite/modules/avatarBirth.js";
|
||||
|
||||
const isBirthday = ref<boolean>(false);
|
||||
const router = useRouter();
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
|
||||
import { AppCalendarData } from "../../data";
|
||||
import { AppCalendarData } from "../../data/index.js";
|
||||
import TibCalendarItem from "../itembox/tib-calendar-item.vue";
|
||||
import ToCalendar from "../overlay/to-calendar.vue";
|
||||
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { useHomeStore } from "../../store/modules/home";
|
||||
import { createPost, createTGWindow } from "../../utils/TGWindow";
|
||||
import { stamp2LastTime } from "../../utils/toolFunc";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import { useHomeStore } from "../../store/modules/home.js";
|
||||
import { createPost, createTGWindow } from "../../utils/TGWindow.js";
|
||||
import { stamp2LastTime } from "../../utils/toolFunc.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||
|
||||
import THomeCard from "./t-homecard.vue";
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { createPost } from "../../utils/TGWindow";
|
||||
import { stamp2LastTime } from "../../utils/toolFunc";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import { createPost } from "../../utils/TGWindow.js";
|
||||
import { stamp2LastTime } from "../../utils/toolFunc.js";
|
||||
|
||||
import THomeCard from "./t-homecard.vue";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import TItemBox from "../main/t-itembox.vue";
|
||||
import type { TItemBoxData } from "../main/t-itembox.vue";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import TItemBox from "../main/t-itembox.vue";
|
||||
import type { TItemBoxData } from "../main/t-itembox.vue";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import TItemBox, { type TItemBoxData } from "../main/t-itembox.vue";
|
||||
|
||||
interface TibWikiAbyssProps {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import TItemBox, { type TItemBoxData } from "../main/t-itembox.vue";
|
||||
|
||||
interface TibWikiAbyssProps {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onBeforeMount, ref } from "vue";
|
||||
|
||||
import { createPost } from "../../utils/TGWindow";
|
||||
import { createPost } from "../../utils/TGWindow.js";
|
||||
import TpAvatar from "../post/tp-avatar.vue";
|
||||
|
||||
interface TPostCardProps {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// utils
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import { generateShareImg } from "../../utils/TGShare.js";
|
||||
|
||||
interface TShareBtnProps {
|
||||
modelValue: HTMLElement;
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
|
||||
import { AppAchievementsData, AppAchievementSeriesData } from "../../data";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { AppAchievementsData, AppAchievementSeriesData } from "../../data/index.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
import ToPostSearch from "../post/to-postSearch.vue";
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ import { ResponseType } from "@tauri-apps/api/http";
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import { xml2json } from "xml-js";
|
||||
|
||||
import { copyToClipboard, getImageBuffer, saveCanvasImg } from "../../utils/TGShare";
|
||||
import { bytesToSize } from "../../utils/toolFunc";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { copyToClipboard, getImageBuffer, saveCanvasImg } from "../../utils/TGShare.js";
|
||||
import { bytesToSize } from "../../utils/toolFunc.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
interface ToArcBirthProps {
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
import { computed } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { useAppStore } from "../../store/modules/app.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
interface ToChannelProps {
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from "vue";
|
||||
|
||||
import TSUserCollection from "../../plugins/Sqlite/modules/userCollect";
|
||||
import showConfirm from "../func/confirm";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import TSUserCollection from "../../plugins/Sqlite/modules/userCollect.js";
|
||||
import showConfirm from "../func/confirm.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
interface ToPostCollectProps {
|
||||
|
||||
@@ -22,11 +22,11 @@ import { storeToRefs } from "pinia";
|
||||
import QrcodeVue from "qrcode.vue";
|
||||
import { computed, onUnmounted, reactive, ref, watch } from "vue";
|
||||
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import { useUserStore } from "../../store/modules/user.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import TGRequest from "../../web/request/TGRequest.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
interface ToWebLoginProps {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
import { generateShareImg } from "../../utils/TGShare.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
interface ToNamecardProps {
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from "vue";
|
||||
|
||||
import TSUserCollection from "../../plugins/Sqlite/modules/userCollect";
|
||||
import showConfirm from "../func/confirm";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import TSUserCollection from "../../plugins/Sqlite/modules/userCollect.js";
|
||||
import showConfirm from "../func/confirm.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
interface ToPostCollectProps {
|
||||
@@ -100,7 +100,8 @@ async function deleteCollect(item: TGApp.Sqlite.UserCollection.UFCollection): Pr
|
||||
});
|
||||
return;
|
||||
}
|
||||
const resD = await TSUserCollection.deleteCollect(item.title);
|
||||
// todo,这边暂时将默认force设为false,后续需要根据需求修改
|
||||
const resD = await TSUserCollection.deleteCollect(item.title, false);
|
||||
if (resD) {
|
||||
showSnackbar({
|
||||
text: "删除成功",
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
import { event } from "@tauri-apps/api";
|
||||
import { onBeforeMount, ref, watch } from "vue";
|
||||
|
||||
import TSUserCollection from "../../plugins/Sqlite/modules/userCollect";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import showConfirm from "../func/confirm";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import TSUserCollection from "../../plugins/Sqlite/modules/userCollect.js";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
import showConfirm from "../func/confirm.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import ToPostCollect from "../overlay/to-postCollect.vue";
|
||||
|
||||
const isCollected = ref(false);
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
|
||||
import Mys from "../../plugins/Mys";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
import TPostCard from "../main/t-postcard.vue";
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { StyleValue, ref } from "vue";
|
||||
|
||||
import { bytesToSize } from "../../utils/toolFunc";
|
||||
import { bytesToSize } from "../../utils/toolFunc.js";
|
||||
|
||||
import TpoImage from "./tpo-image.vue";
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
import { toRaw } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { parseLink, parsePost } from "../../utils/linkParser";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { parseLink, parsePost } from "../../utils/linkParser.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
|
||||
interface TpLinkCard {
|
||||
insert: {
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { toRaw } from "vue";
|
||||
|
||||
import TGClient from "../../utils/TGClient";
|
||||
import showConfirm from "../func/confirm";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import TGClient from "../../utils/TGClient.js";
|
||||
import showConfirm from "../func/confirm.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
|
||||
export interface TpMention {
|
||||
insert: {
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
import { onMounted, ref, StyleValue, toRaw } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { getEmojis } from "../../plugins/Mys/request/getEmojis";
|
||||
import { parseLink, parsePost } from "../../utils/linkParser";
|
||||
import { isColorSimilar } from "../../utils/toolFunc";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { getEmojis } from "../../plugins/Mys/request/getEmojis.js";
|
||||
import { parseLink, parsePost } from "../../utils/linkParser.js";
|
||||
import { isColorSimilar } from "../../utils/toolFunc.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
|
||||
export interface TpText {
|
||||
insert: string;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { StyleValue } from "vue";
|
||||
import { Component, StyleValue } from "vue";
|
||||
|
||||
import TpMention, { type TpMention as TpMentionType } from "./tp-mention.vue";
|
||||
import TpText, { type TpText as TpTextType } from "./tp-text.vue";
|
||||
@@ -24,7 +24,7 @@ interface TpTextsProps {
|
||||
|
||||
const props = defineProps<TpTextsProps>();
|
||||
|
||||
function getComp(text: TpTextType | TpMentionType): string {
|
||||
function getComp(text: TpTextType | TpMentionType): Component {
|
||||
if (typeof text.insert === "string") {
|
||||
return TpText;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, toRaw } from "vue";
|
||||
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import TGLogger from "../../utils/TGLogger.js";
|
||||
|
||||
interface TpUnknownProps {
|
||||
data: TGApp.Plugins.Mys.SctPost.Empty;
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
import { window as TauriWindow } from "@tauri-apps/api";
|
||||
import { onBeforeMount, onMounted, ref } from "vue";
|
||||
|
||||
import Bili from "../../plugins/Bili";
|
||||
import { saveImgLocal } from "../../utils/TGShare";
|
||||
import Bili from "../../plugins/Bili/index.js";
|
||||
import { saveImgLocal } from "../../utils/TGShare.js";
|
||||
|
||||
interface TpVideo {
|
||||
insert: {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { window as TauriWindow } from "@tauri-apps/api";
|
||||
import Artplayer from "artplayer";
|
||||
import type { Option } from "artplayer/types/option";
|
||||
import type { Option } from "artplayer/types/option.js";
|
||||
import { onMounted, ref, toRaw } from "vue";
|
||||
|
||||
interface TpVod {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
import Mys from "../../plugins/Mys";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
|
||||
interface TpVote {
|
||||
insert: {
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
import { ref, computed, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import Mys from "../../plugins/Mys";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
interface TpoCollectionProps {
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onUnmounted, ref } from "vue";
|
||||
|
||||
import { copyToClipboard, getImageBuffer, saveCanvasImg } from "../../utils/TGShare";
|
||||
import { bytesToSize } from "../../utils/toolFunc";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { copyToClipboard, getImageBuffer, saveCanvasImg } from "../../utils/TGShare.js";
|
||||
import { bytesToSize } from "../../utils/toolFunc.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
import { TpImage } from "./tp-image.vue";
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from "vue";
|
||||
|
||||
import Mys from "../../plugins/Mys";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TOverlay from "../main/t-overlay.vue";
|
||||
|
||||
interface TpoLotteryProps {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</TucDetailDesc>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { parseHtmlText } from "../../utils/toolFunc";
|
||||
import { parseHtmlText } from "../../utils/toolFunc.js";
|
||||
|
||||
import TucDetailConstellation from "./tuc-detail-constellation.vue";
|
||||
import TucDetailDesc from "./tuc-detail-desc.vue";
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
|
||||
import { parseHtmlText } from "../../utils/toolFunc";
|
||||
import { parseHtmlText } from "../../utils/toolFunc.js";
|
||||
|
||||
import TucDetailDesc from "./tuc-detail-desc.vue";
|
||||
import TucDetailItemBox from "./tuc-detail-itembox.vue";
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, onUnmounted, ref } from "vue";
|
||||
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
import { saveImgLocal } from "../../utils/TGShare";
|
||||
import TGSqlite from "../../plugins/Sqlite/index.js";
|
||||
import { saveImgLocal } from "../../utils/TGShare.js";
|
||||
import TItemBox from "../main/t-itembox.vue";
|
||||
|
||||
interface TucRoleBoxProps {
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
import { saveImgLocal } from "../../utils/TGShare";
|
||||
import { saveImgLocal } from "../../utils/TGShare.js";
|
||||
|
||||
interface TurHomeSubProps {
|
||||
data: TGApp.Sqlite.Record.Home;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
|
||||
import TurWorldSub from "./tur-world-sub.vue";
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import { event } from "@tauri-apps/api";
|
||||
import { UnlistenFn } from "@tauri-apps/api/helpers/event";
|
||||
import { onMounted, onUnmounted, ref } from "vue";
|
||||
|
||||
import { saveImgLocal } from "../../utils/TGShare";
|
||||
import { saveImgLocal } from "../../utils/TGShare.js";
|
||||
|
||||
interface TurWorldSubProps {
|
||||
theme: "default" | "dark";
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<TopNamecard :data="nameCard" @selected="toNameCard" />
|
||||
<TopNamecard :data="nameCard" @selected="toNameCard" v-if="nameCard" />
|
||||
<TwcMaterials :data="data.materials" />
|
||||
<TwcSkills :data="data.skills" />
|
||||
<TwcConstellations :data="data.constellation" />
|
||||
@@ -100,11 +100,11 @@
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { WikiCharacterData, AppNameCardsData, AppCharacterData } from "../../data";
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { parseHtmlText } from "../../utils/toolFunc";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { WikiCharacterData, AppNameCardsData, AppCharacterData } from "../../data/index.js";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import { createTGWindow } from "../../utils/TGWindow.js";
|
||||
import { parseHtmlText } from "../../utils/toolFunc.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||
import ToNamecard from "../overlay/to-namecard.vue";
|
||||
import TopNamecard from "../overlay/top-namecard.vue";
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
|
||||
import { parseHtmlText } from "../../utils/toolFunc";
|
||||
import { parseHtmlText } from "../../utils/toolFunc.js";
|
||||
|
||||
interface TwcConstellationProps {
|
||||
data: TGApp.Plugins.Hutao.Character.RhisdTalent[];
|
||||
|
||||
@@ -19,13 +19,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- todo 这边加了 v-if,需要经过测试 -->
|
||||
<TwoMaterial :data="curData" v-model="showOverlay" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import { WikiMaterialData } from "../../data";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { WikiMaterialData } from "../../data/index.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
|
||||
import TwoMaterial from "./two-material.vue";
|
||||
|
||||
@@ -35,7 +36,15 @@ interface TwcMaterialsProp {
|
||||
|
||||
const props = defineProps<TwcMaterialsProp>();
|
||||
const showOverlay = ref(false);
|
||||
const curData = ref<TGApp.App.Material.WikiItem>();
|
||||
const curData = ref<TGApp.App.Material.WikiItem>({
|
||||
id: 0,
|
||||
name: "",
|
||||
description: "",
|
||||
type: "",
|
||||
star: 0,
|
||||
source: [],
|
||||
convert: [],
|
||||
});
|
||||
|
||||
function checkData(item: TGApp.App.Calendar.Material) {
|
||||
if (showOverlay.value) showOverlay.value = false;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
|
||||
import { parseHtmlText } from "../../utils/toolFunc";
|
||||
import { parseHtmlText } from "../../utils/toolFunc.js";
|
||||
|
||||
interface TwcSkillsProps {
|
||||
data: TGApp.App.Character.WikiSkill[];
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
|
||||
import { WikiWeaponData } from "../../data";
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { parseHtmlText } from "../../utils/toolFunc";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import { WikiWeaponData } from "../../data/index.js";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import { createTGWindow } from "../../utils/TGWindow.js";
|
||||
import { parseHtmlText } from "../../utils/toolFunc.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||
|
||||
import TwcMaterials from "./twc-materials.vue";
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
</v-card>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
import Mys from "../../plugins/Mys/index.js";
|
||||
import { createTGWindow } from "../../utils/TGWindow.js";
|
||||
import showSnackbar from "../func/snackbar.js";
|
||||
|
||||
interface TwgCardProps {
|
||||
data: TGApp.App.GCG.WikiBriefInfo;
|
||||
|
||||
Reference in New Issue
Block a user