mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
⚡️ 仅在主窗口添加米社回调处理
This commit is contained in:
@@ -157,7 +157,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<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 { computed, onMounted, ref } from "vue";
|
||||||
|
|
||||||
import { useAppStore } from "../../store/modules/app";
|
import { useAppStore } from "../../store/modules/app";
|
||||||
@@ -214,7 +214,9 @@ function collapse(): void {
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await listenOnTheme();
|
await listenOnTheme();
|
||||||
|
if (TauriWindow.getCurrent().label === "TeyvatGuide") {
|
||||||
await mhyClient.run();
|
await mhyClient.run();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
async function listenOnTheme(): Promise<void> {
|
async function listenOnTheme(): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user