️ 仅在主窗口添加米社回调处理

This commit is contained in:
BTMuli
2023-12-16 16:04:30 +08:00
parent 5f26e8c01d
commit 02398e3d63

View File

@@ -157,7 +157,7 @@
</template>
<script lang="ts" setup>
import { event } from "@tauri-apps/api";
import { event, window as TauriWindow } from "@tauri-apps/api";
import { computed, onMounted, ref } from "vue";
import { useAppStore } from "../../store/modules/app";
@@ -214,7 +214,9 @@ function collapse(): void {
onMounted(async () => {
await listenOnTheme();
await mhyClient.run();
if (TauriWindow.getCurrent().label === "TeyvatGuide") {
await mhyClient.run();
}
});
async function listenOnTheme(): Promise<void> {