Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
修改currentCatId的默认值从wonders_of_the_world为wonders-of-the-world
  • Loading branch information
leavesandflowers committed May 6, 2024
1 parent ed36653 commit 564d008
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/views/Achievement/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<div class="chk">
<el-checkbox v-model="hideFinished" label="隐藏已完成" size="large" />
</div>
<div class="chk">
<div v-if="!checkIfAllCat" class="chk">
<el-checkbox
v-model="selectAllCat"
label="全选本页"
Expand Down Expand Up @@ -438,8 +438,9 @@ export default defineComponent({
}, 0)
})
const route = useRoute()
const ALLCAT = 'wonders-of-the-world'
const currentCatId = computed(() => {
return route.params.cat || 'wonders_of_the_world'
return route.params.cat || ALLCAT
})
const currentCat = computed(() => {
const v = achievementCat.value.find((i) => i.key === currentCatId.value) || achievementCat.value[0]
Expand Down Expand Up @@ -608,6 +609,7 @@ export default defineComponent({
}
return data
})
const checkIfAllCat = computed(() => currentCatId.value === ALLCAT)
const checkAllCat = (checked: boolean) => {
const data = currentCat.value.achievements.concat([])
if (checked) {
Expand Down Expand Up @@ -761,6 +763,7 @@ export default defineComponent({
sortByStatus,
hideFinished,
selectAllCat,
checkIfAllCat,
checkAllCat,
totalCount,
totalFin,
Expand Down

0 comments on commit 564d008

Please sign in to comment.