mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🌱 添加 wiki 武器类型相关
This commit is contained in:
@@ -13,18 +13,25 @@ import { ref, computed } from "vue";
|
||||
import TibWikiWeapon from "../../components/itembox/tib-wiki-weapon.vue";
|
||||
import { AppWeaponData } from "../../data";
|
||||
import Mys from "../../plugins/Mys";
|
||||
import { createTGWindow } from "../../utils/TGWindow";
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { createTGWindow, createWiki } from "../../utils/TGWindow";
|
||||
|
||||
// snackbar
|
||||
const snackbar = ref<boolean>(false);
|
||||
// data
|
||||
const cardsInfo = computed(() => AppWeaponData);
|
||||
const appStore = useAppStore();
|
||||
|
||||
function toOuter(item: TGApp.App.Weapon.WikiBriefInfo): void {
|
||||
if (item.contentId === 0) {
|
||||
snackbar.value = true;
|
||||
return;
|
||||
}
|
||||
// 如果是调试环境,打开 wiki 页面
|
||||
if (appStore.devMode) {
|
||||
createWiki("Weapon", item.id.toString());
|
||||
return;
|
||||
}
|
||||
const url = Mys.Api.Obc.replace("{contentId}", item.contentId.toString());
|
||||
createTGWindow(url, "Sub_window", `Content_${item.contentId} ${item.name}`, 1200, 800, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user