Browse Source

fix: 修复导览交互切换无效问题

v1.0.1
jiannibang 4 years ago
parent
commit
15c7967d48
  1. 2
      src/components/PublicComponent/PublicComponent.vue
  2. 51
      src/components/Search/Search.vue
  3. 8
      src/views/Guide/Guide.vue

2
src/components/PublicComponent/PublicComponent.vue

@ -81,7 +81,7 @@ onMounted(() => {
setInterval(() => {
i++
store.SET_CURRENT_THEME(['main', 'fashion', 'highend'][i % 3])
}, 10000)
}, 5000)
window.addEventListener('touchend', checkHandleScreen)
})
onBeforeUnmount(() => {

51
src/components/Search/Search.vue

@ -1,6 +1,5 @@
<template>
<Dialog @close="close">
<div class="search-content">
<div class="bar">
<div class="icon" :style="{ backgroundImage: `url(${theme.images.searchIcon})` }"></div>
<div class="stick"></div>
@ -8,6 +7,7 @@
<input v-else @click="setSearch" v-model="keywords" type="text" readonly class="input" />
<img :src="theme.images.searchClear" class="clear" v-if="keywords" @click="clear" />
</div>
<div class="search-content">
<div class="top" v-if="!showVoice">
<div class="facs">
<h1 class="title">公共设施</h1>
@ -126,31 +126,11 @@ onBeforeUnmount(() => {
position: relative;
z-index: 50;
}
.search-content {
position: absolute;
top: 315px;
right: 40px;
bottom: 302px;
left: 40px;
background: var(--search-background);
backdrop-filter: blur(10px);
border-radius: var(--searchBar-borderRadius);
display: flex;
flex-direction: column;
align-items: stretch;
z-index: 2;
.title {
font-weight: 900;
font-size: 24px;
line-height: 28px;
color: rgba(0, 0, 0, 0.8);
}
.bar {
position: absolute;
top: -55px;
left: 28px;
right: 28px;
.bar {
position: fixed;
top: 260px;
left: 68px;
right: 68px;
background: var(--search-barBackground);
border: var(--searchBar-border);
box-shadow: 0px 15px 24px rgba(0, 0, 0, 0.05);
@ -160,6 +140,7 @@ onBeforeUnmount(() => {
padding-right: 10px;
padding-left: 40px;
height: 100px;
z-index: 52;
.icon {
width: 56px;
height: 56px;
@ -199,7 +180,25 @@ onBeforeUnmount(() => {
.voice-icon {
width: 190px;
}
}
.search-content {
position: absolute;
top: 315px;
right: 40px;
bottom: 302px;
left: 40px;
background: var(--search-background);
backdrop-filter: blur(10px);
border-radius: var(--searchBar-borderRadius);
z-index: 2;
overflow: hidden;
.title {
font-weight: 900;
font-size: 24px;
line-height: 28px;
color: rgba(0, 0, 0, 0.8);
}
.top {
height: 460px;
background: rgba(255, 255, 255, 0.6);

8
src/views/Guide/Guide.vue

@ -50,10 +50,10 @@
<div class="shop-list-wrapper">
<BrandScroll v-if="initiated" :shop="shop" :need-focus="true" @click="handleShop" :list="selectedShopList" :isRow="isRow" :config="config" />
<div class="switch">
<img class="btn" v-if="isRow" :src="theme.images.grid" />
<img class="btn" v-else :src="theme.images.gridActive" />
<img class="btn" v-if="!isRow" :src="theme.images.row" />
<img class="btn" v-else :src="theme.images.rowActive" />
<img class="btn" v-if="isRow" :src="theme.images.grid" @click="isRow = false" />
<img class="btn" v-else :src="theme.images.gridActive" @click="isRow = false" />
<img class="btn" v-if="!isRow" :src="theme.images.row" @click="isRow = true" />
<img class="btn" v-else :src="theme.images.rowActive" @click="isRow = true" />
</div>
</div>
</View>

Loading…
Cancel
Save