diff --git a/src/views/index/Maps.vue b/src/views/index/Maps.vue index aaa47de..9ea328a 100644 --- a/src/views/index/Maps.vue +++ b/src/views/index/Maps.vue @@ -174,7 +174,7 @@ 跳转 - + @@ -195,6 +195,7 @@ const hasNextPage = ref(false) const jumpPage = ref('') const viewMode = ref('table') const showBackTop = ref(false) +const isMobile = ref(window.innerWidth <= 700) // 排序和筛选相关 const orderOptions = [ @@ -334,6 +335,9 @@ onMounted(() => { tagOptions.value = tags }) window.addEventListener('scroll', handleScroll) + window.addEventListener('resize', () => { + isMobile.value = window.innerWidth <= 700 + }) }) onUnmounted(() => { window.removeEventListener('scroll', handleScroll) @@ -717,6 +721,7 @@ onUnmounted(() => { vertical-align: middle; } .back-to-top-btn { + display: flex; position: fixed; right: 18px; bottom: 18px; @@ -727,7 +732,6 @@ onUnmounted(() => { background: #fff; box-shadow: 0 2px 8px rgba(37,99,235,0.12); border: none; - display: flex; align-items: center; justify-content: center; cursor: pointer;