From a4376549ba40ea91ae720a1dc8c3f6d555b872bc Mon Sep 17 00:00:00 2001 From: Kunagisa <1549184870@qq.com> Date: Sat, 14 Jun 2025 17:37:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96maps=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/Maps.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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;