Skip to content

Commit

Permalink
modified filter default behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
longxiaokong committed Jun 23, 2024
1 parent 235ac63 commit a2c2c00
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 1 deletion.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified jsconfig.json
100644 → 100755
Empty file.
Empty file modified src/App.vue
100644 → 100755
Empty file.
Empty file modified src/components/global/MobileSearchBar.vue
100644 → 100755
Empty file.
Empty file modified src/components/global/Nothing.vue
100644 → 100755
Empty file.
16 changes: 15 additions & 1 deletion src/composables/courses/all/useStatisticCard.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inject, onMounted, reactive, watch } from "vue"
import { inject, onMounted, onUnmounted, reactive, watch } from "vue"
import { mdiCity, mdiChevronUp, mdiChevronDown } from "@mdi/js";
import useDebounce from "@/composables/global/useDebounce";

Expand Down Expand Up @@ -36,7 +36,13 @@ export default () => {
}
}))

watch(() => window.innerWidth, useDebounce((to, from) => {
updateShowAll();
}))

onMounted(() => {
updateShowAll();
window.addEventListener('resize', updateShowAll, { passive: true })
if (courseFilterStatus.selected.length === 0) {
status.selectAll = false
status.selectNotAll = true
Expand All @@ -47,6 +53,14 @@ export default () => {
}
})

onUnmounted(() => {
window.removeEventListener('resize', updateShowAll, { passive: true })
})

const updateShowAll = () => {
status.showAll = window.innerWidth >= 600;
}

return { statics, courseStatistic, courseFilterStatus, status }

}
Empty file modified src/composables/courses/comment/useWritingBox.js
100644 → 100755
Empty file.
Empty file modified src/composables/global/useFetching.js
100644 → 100755
Empty file.
Empty file modified src/composables/global/useHttpError.js
100644 → 100755
Empty file.
Empty file modified src/composables/global/useParseScore.js
100644 → 100755
Empty file.
Empty file modified src/views/CourseAll.vue
100644 → 100755
Empty file.
Empty file modified vue.config.js
100644 → 100755
Empty file.

0 comments on commit a2c2c00

Please sign in to comment.