mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-15 03:53:16 +08:00
🚸 更新系列参数处理逻辑
This commit is contained in:
@@ -48,7 +48,7 @@ type TuaAchiListProps = {
|
||||
isSearch: boolean;
|
||||
};
|
||||
type TuaAchiListEmits = {
|
||||
(e: "update:series", v: number): void;
|
||||
(e: "update:series", v: number | undefined): void;
|
||||
(e: "update:isSearch", v: boolean): false;
|
||||
};
|
||||
|
||||
@@ -86,13 +86,13 @@ async function searchAchi(): Promise<void> {
|
||||
achievements.value = await TSUserAchi.searchAchi(props.uid, props.search);
|
||||
if (achievements.value.length > 0) {
|
||||
showSnackbar.success(`成功获取${achievements.value.length}条成就`);
|
||||
emits("update:series", -1);
|
||||
emits("update:series", undefined);
|
||||
}
|
||||
emits("update:isSearch", false);
|
||||
}
|
||||
|
||||
async function loadAchi(): Promise<void> {
|
||||
if (props.isSearch || props.series === -1) return;
|
||||
if (props.isSearch || props.series === undefined) return;
|
||||
achievements.value = await TSUserAchi.getAchievements(props.uid, props.series);
|
||||
const ov = await TSUserAchi.getOverview(props.uid, props.series);
|
||||
isFinish.value = ov.fin === ov.total;
|
||||
|
||||
Reference in New Issue
Block a user