|
|
@ -16,7 +16,12 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="keyboard-wrapper"> |
|
|
<div class="keyboard-wrapper"> |
|
|
<Tabs @click="handleTab" :list="list" class="tabs" /> |
|
|
|
|
|
|
|
|
<div class="tabs tabs-wrapper"> |
|
|
|
|
|
<div class="tab" :class="{ active: tabIdx === index }" @click="handleTab(index)" v-for="(item, index) of list" :key="item.name"> |
|
|
|
|
|
<img :src="tabIdx === index ? item.iconActive : item.icon" alt="" /> |
|
|
|
|
|
{{ item.name }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<KeyboardByLetter @del="del" @handle-letter="handleLetter" v-if="tabIdx === 0" /> |
|
|
<KeyboardByLetter @del="del" @handle-letter="handleLetter" v-if="tabIdx === 0" /> |
|
|
<KeyboardByWritten @del="del" @handle-word="handleLetter" v-else /> |
|
|
<KeyboardByWritten @del="del" @handle-word="handleLetter" v-else /> |
|
|
</div> |
|
|
</div> |
|
|
@ -47,7 +52,7 @@ import { computed, defineAsyncComponent, ref, onBeforeUnmount } from 'vue' |
|
|
import { useRouter } from 'vue-router' |
|
|
import { useRouter } from 'vue-router' |
|
|
import { storeToRefs } from 'pinia' |
|
|
import { storeToRefs } from 'pinia' |
|
|
import { useStore } from '@/store/root' |
|
|
import { useStore } from '@/store/root' |
|
|
import { list } from './tabs' |
|
|
|
|
|
|
|
|
|
|
|
import { useSearchShop } from '@/composables/useSearchShop' |
|
|
import { useSearchShop } from '@/composables/useSearchShop' |
|
|
import { useFacilityNav } from '@/composables/useFacilityNav' |
|
|
import { useFacilityNav } from '@/composables/useFacilityNav' |
|
|
import { useStatistics } from '@/composables/useStatistics' |
|
|
import { useStatistics } from '@/composables/useStatistics' |
|
|
@ -55,6 +60,7 @@ import Dialog from '@/layouts/Dialog.vue' |
|
|
import FacilityItem from '@/base/FacilityItem/FacilityItem.vue' |
|
|
import FacilityItem from '@/base/FacilityItem/FacilityItem.vue' |
|
|
import Tabs from '@/components/Tabs/Tabs.vue' |
|
|
import Tabs from '@/components/Tabs/Tabs.vue' |
|
|
import SearchResultList from '@/components/SearchResultList/SearchResultList.vue' |
|
|
import SearchResultList from '@/components/SearchResultList/SearchResultList.vue' |
|
|
|
|
|
|
|
|
const KeyboardByLetter = defineAsyncComponent(() => import('@/components/KeyboardByLetter/KeyboardByLetter.vue')) |
|
|
const KeyboardByLetter = defineAsyncComponent(() => import('@/components/KeyboardByLetter/KeyboardByLetter.vue')) |
|
|
const KeyboardByWritten = defineAsyncComponent(() => import('@/components/KeyboardByWritten/KeyboardByWritten.vue')) |
|
|
const KeyboardByWritten = defineAsyncComponent(() => import('@/components/KeyboardByWritten/KeyboardByWritten.vue')) |
|
|
const Voice = defineAsyncComponent(() => import('@/components/Voice/Voice.vue')) |
|
|
const Voice = defineAsyncComponent(() => import('@/components/Voice/Voice.vue')) |
|
|
@ -68,6 +74,25 @@ const router = useRouter() |
|
|
const store = useStore() |
|
|
const store = useStore() |
|
|
const { indexList, shopList, facilityList, config, showVoice, theme } = storeToRefs(store) |
|
|
const { indexList, shopList, facilityList, config, showVoice, theme } = storeToRefs(store) |
|
|
|
|
|
|
|
|
|
|
|
const list = computed(() => |
|
|
|
|
|
theme.value |
|
|
|
|
|
? [ |
|
|
|
|
|
{ |
|
|
|
|
|
name: '键盘输入', |
|
|
|
|
|
nameEn: 'keyboard input', |
|
|
|
|
|
icon: theme.value.images.keyboard, |
|
|
|
|
|
iconActive: theme.value.images.keyboard_active |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '手写输入', |
|
|
|
|
|
nameEn: 'handwriting input', |
|
|
|
|
|
icon: theme.value.images.write, |
|
|
|
|
|
iconActive: theme.value.images.write_active |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
: [] |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
const hotRecommend = computed(() => indexList.value.hotSearch ?? []) |
|
|
const hotRecommend = computed(() => indexList.value.hotSearch ?? []) |
|
|
const showClassify = ref(false) |
|
|
const showClassify = ref(false) |
|
|
|
|
|
|
|
|
@ -192,16 +217,10 @@ onBeforeUnmount(() => { |
|
|
border-radius: var(--searchBar-borderRadius); |
|
|
border-radius: var(--searchBar-borderRadius); |
|
|
z-index: 2; |
|
|
z-index: 2; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
.title { |
|
|
|
|
|
font-weight: 900; |
|
|
|
|
|
font-size: 24px; |
|
|
|
|
|
line-height: 28px; |
|
|
|
|
|
color: rgba(0, 0, 0, 0.8); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.top { |
|
|
.top { |
|
|
height: 460px; |
|
|
height: 460px; |
|
|
background: rgba(255, 255, 255, 0.6); |
|
|
|
|
|
|
|
|
background: var(--search-topBg, rgba(255, 255, 255, 0.6)); |
|
|
border-radius: var(--searchBar-borderRadius); |
|
|
border-radius: var(--searchBar-borderRadius); |
|
|
margin: 10px 10px 48px 10px; |
|
|
margin: 10px 10px 48px 10px; |
|
|
display: flex; |
|
|
display: flex; |
|
|
@ -209,6 +228,12 @@ onBeforeUnmount(() => { |
|
|
padding-left: 46px; |
|
|
padding-left: 46px; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
.facs { |
|
|
.facs { |
|
|
|
|
|
.title { |
|
|
|
|
|
font-weight: 900; |
|
|
|
|
|
font-size: 24px; |
|
|
|
|
|
line-height: 28px; |
|
|
|
|
|
color: var(--search-facTitleColor); |
|
|
|
|
|
} |
|
|
width: 300px; |
|
|
width: 300px; |
|
|
padding-top: 111px; |
|
|
padding-top: 111px; |
|
|
.facility-list { |
|
|
.facility-list { |
|
|
@ -219,6 +244,34 @@ onBeforeUnmount(() => { |
|
|
gap: 12px 24px; |
|
|
gap: 12px 24px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
.tabs-wrapper { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 64px; |
|
|
|
|
|
background: var(--search-tabsBg, rgba(0, 0, 0, 0.05)); |
|
|
|
|
|
border-radius: var(--global-radius, 12px); |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
|
|
.tab { |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
flex: 1; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
color: var(--search-tabColor, rgba(0, 0, 0, 0.6)); |
|
|
|
|
|
border-radius: var(--global-radius, 12px); |
|
|
|
|
|
&.active { |
|
|
|
|
|
background: var(--search-tabActiveBg, #ffffff); |
|
|
|
|
|
color: var(--search-tabActiveColor, rgba(0, 0, 0, 0.8)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
img { |
|
|
|
|
|
width: 24px; |
|
|
|
|
|
height: 24px; |
|
|
|
|
|
margin-right: 12px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
.keyboard-wrapper { |
|
|
.keyboard-wrapper { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
padding-top: 75px; |
|
|
padding-top: 75px; |
|
|
@ -232,6 +285,9 @@ onBeforeUnmount(() => { |
|
|
} |
|
|
} |
|
|
.recs { |
|
|
.recs { |
|
|
padding-left: 56px; |
|
|
padding-left: 56px; |
|
|
|
|
|
.title { |
|
|
|
|
|
color: var(--index-hotSearchTitleColor); |
|
|
|
|
|
} |
|
|
.hot-scroll { |
|
|
.hot-scroll { |
|
|
padding-top: 16px; |
|
|
padding-top: 16px; |
|
|
white-space: nowrap; |
|
|
white-space: nowrap; |
|
|
@ -242,14 +298,14 @@ onBeforeUnmount(() => { |
|
|
display: inline-block; |
|
|
display: inline-block; |
|
|
max-width: 170px; |
|
|
max-width: 170px; |
|
|
height: 52px; |
|
|
height: 52px; |
|
|
background: rgba(255, 255, 255, 0.8); |
|
|
|
|
|
|
|
|
background: var(--index-hotSearchBg); |
|
|
border-radius: var(--global-radius, 100px); |
|
|
border-radius: var(--global-radius, 100px); |
|
|
.text { |
|
|
.text { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
font-weight: 900; |
|
|
font-weight: 900; |
|
|
font-size: 16px; |
|
|
font-size: 16px; |
|
|
line-height: 52px; |
|
|
line-height: 52px; |
|
|
color: rgba(0, 0, 0, 0.6); |
|
|
|
|
|
|
|
|
color: var(--index-hotSearchColor); |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
white-space: nowrap; |
|
|
white-space: nowrap; |
|
|
text-overflow: ellipsis; |
|
|
text-overflow: ellipsis; |
|
|
|