diff --git a/src/admin/achievement/list.vue b/src/admin/achievement/list.vue index ffccbf4..68883b8 100644 --- a/src/admin/achievement/list.vue +++ b/src/admin/achievement/list.vue @@ -23,6 +23,15 @@ const RARITY_LABEL: Record = { platinum: "白金", } +// 下架的只在有的时候才提,全部上架时标题不啰嗦 +const title = computed(() => { + if (!list.value.length) return "成就管理" + const offline = list.value.filter((a) => !a.visible).length + return offline + ? `成就管理(${list.value.length} 条,${offline} 条下架)` + : `成就管理(${list.value.length} 条)` +}) + async function load() { loading.value = true try { @@ -115,7 +124,7 @@ onMounted(load)