mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-23 22:09:51 +08:00
🩹 修复 ESLint 代码规范错误
This commit is contained in:
@@ -5,15 +5,15 @@
|
||||
v-for="navItem in nav"
|
||||
:key="navItem.id"
|
||||
:label="navItem.name"
|
||||
:mini
|
||||
:mini="true"
|
||||
class="tgn-nav"
|
||||
@click="toNav(navItem)"
|
||||
>
|
||||
<template #icon>
|
||||
<TMiImg :size="28" :ori="true" :src="navItem.icon" alt="navIcon" />
|
||||
<TMiImg :ori="true" :size="28" :src="navItem.icon" alt="navIcon" />
|
||||
</template>
|
||||
</TGameNavItem>
|
||||
<TGameNavItem v-if="hasNav" :mini class="tgn-nav" label="兑换码">
|
||||
<TGameNavItem v-if="hasNav" :mini="true" class="tgn-nav" label="兑换码">
|
||||
<template #icon>
|
||||
<v-icon v-if="!loadCode" color="var(--tgc-od-orange)" size="28" @click="tryGetCode">
|
||||
mdi-code-tags-check
|
||||
@@ -74,7 +74,7 @@ watch(
|
||||
async function loadNav(): Promise<void> {
|
||||
try {
|
||||
nav.value = await ApiHubReq.home(props.gid);
|
||||
console.debug(`[TGameNav][loadNav] 组件数据:`, nav.value);
|
||||
console.warn(`[TGameNav][loadNav] 组件数据:`, nav.value);
|
||||
if (loadCode.value) loadCode.value = false;
|
||||
} catch (e) {
|
||||
await TGLogger.Error(`[TGameNav][loadNav] 加载组件数据失败:${e}`);
|
||||
|
||||
@@ -45,13 +45,12 @@ const progressColor = computed<string>(() => {
|
||||
return "#61afef";
|
||||
});
|
||||
const progressWidth = computed<string>(() => {
|
||||
let final = 10;
|
||||
if (props.data.rank === "5") {
|
||||
if (props.data.gachaType === "2000") final = 80;
|
||||
else final = 90;
|
||||
} else if (props.data.rank === "4") final = 10;
|
||||
else return "0%";
|
||||
return ((props.count / final) * 100).toFixed(2) + "%";
|
||||
if (props.data.gachaType === "2000") return ((props.count / 80) * 100).toFixed(2) + "%";
|
||||
return ((props.count / 90) * 100).toFixed(2) + "%";
|
||||
}
|
||||
if (props.data.rank === "4") return ((props.count / 10) * 100).toFixed(2) + "%";
|
||||
return "0%";
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -48,13 +48,12 @@ const progressColor = computed<string>(() => {
|
||||
return "#61afef";
|
||||
});
|
||||
const progressWidth = computed<string>(() => {
|
||||
let final = 10;
|
||||
if (props.data.rank === "5") {
|
||||
if (props.data.gachaType === "302") final = 80;
|
||||
else final = 90;
|
||||
} else if (props.data.rank === "4") final = 10;
|
||||
else return "0%";
|
||||
return ((props.count / final) * 100).toFixed(2) + "%";
|
||||
if (props.data.gachaType === "302") return ((props.count / 80) * 100).toFixed(2) + "%";
|
||||
return ((props.count / 90) * 100).toFixed(2) + "%";
|
||||
}
|
||||
if (props.data.rank === "4") return ((props.count / 10) * 100).toFixed(2) + "%";
|
||||
return "0%";
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user