️ 优化底部 hint

This commit is contained in:
目棃
2024-01-17 21:10:09 +08:00
parent 566e049734
commit fd7564e149
4 changed files with 5 additions and 19 deletions

View File

@@ -157,9 +157,7 @@ watch(
},
);
onMounted(async () => {
await loadData();
});
onMounted(async () => await loadData());
async function toWiki(): Promise<void> {
if (props.item.contentId === 0) {

View File

@@ -93,6 +93,10 @@ async function loadData(): Promise<void> {
const res = await getWikiData("Weapon", props.item.id.toString());
if (res === undefined) return;
data.value = res.default;
showSnackbar({
text: `成功获取武器 ${props.item.name} 的 Wiki 数据`,
color: "success",
});
selectItems.value = data.value?.affix.Descriptions.map((item) => item.Level) ?? [];
} catch (error) {
showSnackbar({