优化maps页面
This commit is contained in:
parent
1d74f16b33
commit
a4376549ba
@ -174,7 +174,7 @@
|
||||
<button class="jump-btn" @click="handleJumpPage">跳转</button>
|
||||
</div>
|
||||
</div>
|
||||
<button v-if="showBackTop" class="back-to-top-btn" @click="scrollToTop">
|
||||
<button v-if="showBackTop && isMobile" class="back-to-top-btn" @click="scrollToTop">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M12 19V5" stroke="#2563eb" stroke-width="2" stroke-linecap="round"/><path d="M6 11L12 5L18 11" stroke="#2563eb" stroke-width="2" stroke-linecap="round"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user