Browse Source

feat: 全局搜索

潮流
jiannibang 4 years ago
parent
commit
cc69851f67
  1. BIN
      src/assets/images/scrollBar.png
  2. BIN
      src/assets/images/scrollHand.png
  3. BIN
      src/assets/images/search/back.png
  4. BIN
      src/assets/images/search/keyboard.png
  5. BIN
      src/assets/images/search/keyboard_active.png
  6. BIN
      src/assets/images/search/write.png
  7. BIN
      src/assets/images/search/write_active.png
  8. 13
      src/base/FacilityItem/FacilityItem.vue
  9. 4
      src/components/KeyboardByLetter/KeyboardByLetter.vue
  10. 4
      src/components/KeyboardByWritten/KeyboardByWritten.vue
  11. 292
      src/components/Search/Search.vue
  12. BIN
      src/components/Search/clear.png
  13. BIN
      src/components/Search/icon.png
  14. 83
      src/components/SearchResultItem/SearchResultItem.vue
  15. 63
      src/components/SearchResultList/SearchResultList.vue
  16. 38
      src/components/Tabs/Tabs.vue
  17. 3
      src/layouts/Dialog.vue
  18. 2
      src/views/Index/Index.vue

BIN
src/assets/images/scrollBar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

BIN
src/assets/images/scrollHand.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
src/assets/images/search/back.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 832 B

BIN
src/assets/images/search/keyboard.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 301 B

BIN
src/assets/images/search/keyboard_active.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 304 B

BIN
src/assets/images/search/write.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

After

Width:  |  Height:  |  Size: 597 B

BIN
src/assets/images/search/write_active.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 593 B

13
src/base/FacilityItem/FacilityItem.vue

@ -27,18 +27,17 @@ function handleFacility() {
align-items: center; align-items: center;
} }
.facility-icon { .facility-icon {
width: 44px;
height: 44px;
margin-bottom: 6px;
width: 48px;
height: 48px;
margin-bottom: 8px;
} }
.facility-name { .facility-name {
display: inline-block; display: inline-block;
width: 48px; width: 48px;
font-weight: 400;
font-weight: 700;
font-size: 12px; font-size: 12px;
line-height: 12px;
line-height: 14px;
text-align: center; text-align: center;
color: var(--color-black-opacity-4);
transform: scale(0.83);
color: rgba(0, 0, 0, 0.6);
} }
</style> </style>

4
src/components/KeyboardByLetter/KeyboardByLetter.vue

@ -60,7 +60,7 @@ function handleLetter(item, index) {
font-family: 'font_bold'; font-family: 'font_bold';
color: rgba(0, 0, 0, 0.6); color: rgba(0, 0, 0, 0.6);
margin-right: 8px; margin-right: 8px;
margin-bottom: 12px;
margin-bottom: 8px;
&:nth-child(21) { &:nth-child(21) {
margin-left: 28px; margin-left: 28px;
} }
@ -71,7 +71,7 @@ function handleLetter(item, index) {
width: 104px; width: 104px;
} }
&.active { &.active {
background: linear-gradient(90deg, #f6a62c 0%, #ffbc3f 100%);
background: linear-gradient(180deg, #435acd 0%, #749cf3 100%);
color: #fff; color: #fff;
} }
} }

4
src/components/KeyboardByWritten/KeyboardByWritten.vue

@ -5,7 +5,7 @@
<div class="word" @click="handleWord(item, index)" :class="{ active: wordIdx === index }" v-for="(item, index) of wordsList" :key="item">{{ item }}</div> <div class="word" @click="handleWord(item, index)" :class="{ active: wordIdx === index }" v-for="(item, index) of wordsList" :key="item">{{ item }}</div>
</div> </div>
</ScrollView> </ScrollView>
<Written @result="getWordList" :width="552" :height="196" background-color="#ffffff" fill-font-size="48px" fill-style="rgba(0, 0, 0, 0.02)" stroke-style="#F6A62C" />
<Written @result="getWordList" :width="552" :height="196" background-color="#ffffff" fill-font-size="48px" fill-style="rgba(0, 0, 0, 0.02)" stroke-style="#516DD8" />
<div class="del" @click="del"> <div class="del" @click="del">
<img src="../../assets/images/search/del.svg" class="del-icon" alt="" /> <img src="../../assets/images/search/del.svg" class="del-icon" alt="" />
</div> </div>
@ -70,7 +70,7 @@ function del() {
color: rgba(0, 0, 0, 0.6); color: rgba(0, 0, 0, 0.6);
&.active { &.active {
color: #fff; color: #fff;
background: linear-gradient(90deg, #f6a62c 0%, #ffbc3f 100%);
background: linear-gradient(113.71deg, #435acd 0%, #749cf3 100%);
} }
} }
} }

292
src/components/Search/Search.vue

@ -1,48 +1,36 @@
<template> <template>
<Dialog @close="close"> <Dialog @close="close">
<View title="全局搜索" sub-title="Global search" :show-input="false">
<div class="search-content"> <div class="search-content">
<div class="search-left">
<div class="input-wrapper">
<img src="../../assets/images/index/index_search.png" class="search-icon" alt="" />
<input @click="setSearch" v-model="keywords" placeholder="输入首字母搜索店铺" type="text" readonly class="input" />
<img @click="setVoice" src="../../assets/images/search/search-voice.png" class="voice-icon" alt="" />
<div class="bar">
<div class="icon"></div>
<div class="stick"></div>
<div v-if="!keywords" class="placeholder">请输入中英文<span class="meta">首字母</span>查询例如 XBK (星巴克)</div>
<input v-else @click="setSearch" v-model="keywords" type="text" readonly class="input" />
<img src="./clear.png" class="clear" v-if="keywords" @click="clear" />
</div> </div>
<div class="flex" v-if="!showVoice">
<div class="right-box">
<h1 class="title">快捷入口</h1>
<h1 class="title-en">Quick entrance</h1>
<div class="top" v-if="!showVoice">
<div class="facs">
<h1 class="title">公共设施</h1>
<div class="facility-list"> <div class="facility-list">
<FacilityItem @click="_handleFacility(item)" class="margin" :facility="item" v-for="item of facilityList" :key="item.title" /> <FacilityItem @click="_handleFacility(item)" class="margin" :facility="item" v-for="item of facilityList" :key="item.title" />
</div> </div>
</div> </div>
<div class="keyboard-wrapper"> <div class="keyboard-wrapper">
<Tabs @click="handleTab" :list="list" class="width" />
<Tabs @click="handleTab" :list="list" class="tabs" />
<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>
</div> </div>
</div>
<div v-show="!keywords.length && !showVoice">
<h1 class="title">万象热搜</h1>
<h1 class="title-en">MIXC hot search</h1>
<ScrollView class="hot-scroll" :list="hotRecommend" scrollbar>
<div class="hot-box">
<div class="recommend-item" v-for="item of hotRecommend" :key="item.shopId" @click="handleShop(item)">{{ item.shopName }}</div>
</div>
</ScrollView>
<h1 class="title">常见问题</h1>
<h1 class="title-en">common problem</h1>
<div class="question-box">
<QuestionList />
<div class="more-question" @click="showClassify = true">{{ $t('more') }}</div>
<Teleport to="body">
<Transition enter-active-class="animate__animated animate__fadeInDown" leave-active-class="animate__animated animate__fadeOutUp">
<QuestionClassify @close="showClassify = false" v-if="showClassify" />
</Transition>
</Teleport>
<div class="recs" v-show="!keywords.length && !showVoice">
<h1 class="title">大家都在找</h1>
<div class="hot-scroll">
<div class="item" v-for="(item, i) of hotRecommend" :key="item.shopId" @click="handleShop(item)">
<div class="text">{{ item.shopName }}</div>
<img class="medal" v-if="i === 0" src="@/views/Index/fir.svg" />
<img class="medal" v-if="i === 1" src="@/views/Index/sec.svg" />
<img class="medal" v-if="i === 2" src="@/views/Index/thi.svg" />
</div>
</div> </div>
</div> </div>
@ -53,7 +41,6 @@
<div class="search-btn" @click="close"> <div class="search-btn" @click="close">
<img src="../../assets/images/search/back.png" alt="" /> <img src="../../assets/images/search/back.png" alt="" />
</div> </div>
</View>
</Dialog> </Dialog>
</template> </template>
@ -115,6 +102,9 @@ function handleLetter(item) {
function del() { function del() {
keywords.value = keywords.value.substring(0, keywords.value.length - 1) keywords.value = keywords.value.substring(0, keywords.value.length - 1)
} }
const clear = () => {
keywords.value = ''
}
function setSearch() { function setSearch() {
showVoice.value && store.SET_SHOW_VOICE(false) showVoice.value && store.SET_SHOW_VOICE(false)
@ -140,154 +130,152 @@ onBeforeUnmount(() => {
position: relative; position: relative;
z-index: 50; z-index: 50;
} }
::-webkit-input-placeholder {
position: relative;
top: -8px;
color: rgba(0, 0, 0, 0.4);
font-size: 16px;
}
.search-content { .search-content {
position: absolute; position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
top: 315px;
right: 40px;
bottom: 302px;
left: 40px;
background: linear-gradient(180deg, #e0e3ee 0%, #d4d9e7 100%);
backdrop-filter: blur(10px);
border-radius: 24px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: stretch; align-items: stretch;
z-index: -1;
z-index: 2;
.title { .title {
font-weight: 700;
font-weight: 900;
font-size: 24px; font-size: 24px;
color: rgba(0, 0, 0, 0.6);
font-family: 'font_bold';
padding-left: 64px;
padding-bottom: 4px;
}
.title-en {
font-size: 14px;
line-height: 16px;
text-transform: uppercase;
color: rgba(0, 0, 0, 0.4);
padding-left: 64px;
margin-bottom: 32px;
}
line-height: 28px;
color: rgba(0, 0, 0, 0.8);
} }
.input-wrapper {
.bar {
position: absolute;
top: -55px;
left: 28px;
right: 28px;
background: #ffffff;
box-shadow: 0px 15px 24px rgba(0, 0, 0, 0.05);
border-radius: 24px;
display: flex; display: flex;
align-items: center; align-items: center;
padding-right: 5px;
padding-left: 32px;
width: 552px;
height: 88px;
background: #ffffff;
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.3), inset 0px 4px 30px rgba(0, 0, 0, 0.02);
border-radius: 51px;
margin-bottom: 56px;
margin-top: 174px;
margin-left: 432px;
.search-icon {
width: 40px;
margin-right: 24px;
padding-right: 10px;
padding-left: 40px;
height: 100px;
.icon {
width: 56px;
height: 56px;
background: center / cover no-repeat url(./icon.png);
}
.stick {
width: 4px;
height: 38px;
background: linear-gradient(180deg, #6c7ca6 0%, #879aca 100%);
margin: 0 32px;
}
.placeholder {
font-weight: 700;
font-size: 20px;
line-height: 23px;
color: rgba(0, 0, 0, 0.2);
.meta {
color: rgba(81, 109, 216, 1);
}
} }
.input { .input {
flex: 1;
border: none; border: none;
outline: none; outline: none;
width: 262px; width: 262px;
height: 78px;
background: transparent; background: transparent;
font-weight: 700; font-weight: 700;
font-size: 48px; font-size: 48px;
line-height: 59px;
color: rgba(0, 0, 0, 0.8); color: rgba(0, 0, 0, 0.8);
} }
.clear {
display: flex;
width: 80px;
height: 80px;
background: rgba(0, 0, 0, 0.05);
border-radius: 24px;
padding: 16px;
}
.voice-icon { .voice-icon {
width: 190px; width: 190px;
} }
} }
.flex {
.top {
height: 460px;
background: rgba(255, 255, 255, 0.6);
border-radius: 16px;
margin: 10px 10px 48px 10px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding-right: 56px;
}
padding-left: 46px;
.facs {
width: 300px;
padding-top: 111px;
.facility-list { .facility-list {
width: 432px;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
padding-left: 64px;
.margin {
margin-right: 40px;
margin-bottom: 38px;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
width: 264px;
margin-top: 40px;
gap: 12px 24px;
}
}
.keyboard-wrapper {
flex: 1;
padding-top: 75px;
padding-left: 36px;
background: rgba(0, 0, 0, 0.05);
padding-right: 38px;
.tabs {
padding-right: 8px;
} }
} }
.width {
width: 552px;
} }
.recs {
padding-left: 56px;
.hot-scroll { .hot-scroll {
padding-top: 16px;
white-space: nowrap;
width: 944px;
.item {
position: relative; position: relative;
margin-bottom: 64px;
margin-right: 20px;
overflow: hidden;
margin-left: 64px;
height: 142px;
:deep(.bscroll-vertical-scrollbar) {
width: 6px !important;
background: rgba(0, 0, 0, 0.02) !important;
border-radius: 6px !important;
opacity: 1 !important;
.bscroll-indicator {
width: 6px !important;
background: rgba(0, 0, 0, 0.1) !important;
border-radius: 6px !important;
border: none !important;
}
}
}
.recommend-item {
display: inline-block; display: inline-block;
height: 59px;
padding: 0 32px;
font-weight: 700;
font-family: 'font_bold';
font-size: 16px;
line-height: 59px;
max-width: 170px;
height: 52px;
background: rgba(255, 255, 255, 0.8);
border-radius: 100px;
.text {
text-align: center; text-align: center;
color: var(--color-black-opacity-6);
background: var(--color-white-opacity);
border-radius: 50px;
margin-right: 16px;
margin-bottom: 24px;
font-weight: 900;
font-size: 16px;
line-height: 52px;
color: rgba(0, 0, 0, 0.6);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 0 32px;
} }
.question-box {
display: flex;
margin-left: 64px;
:deep(.question_item) {
margin-right: 16px;
.medal {
position: absolute;
width: 32px;
height: 32px;
left: 4px;
top: -10px;
} }
.more-question {
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255, 0.4);
width: 160px;
height: 225px;
border-radius: 12px;
font-weight: 700;
font-size: 20px;
font-family: 'font_bold';
color: rgba(0, 0, 0, 0.6);
padding: 0 60px;
}
.item + .item {
margin-left: 24px;
} }
} }
.search-left {
width: 1048px;
height: 722px;
background: rgba(255, 255, 255, 0.6);
border-radius: 12px;
margin: 16px 16px 64px 16px;
} }
}
.search-right { .search-right {
position: relative; position: relative;
background: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.6);
@ -295,14 +283,6 @@ onBeforeUnmount(() => {
padding-left: 64px; padding-left: 64px;
width: 696px; width: 696px;
.keyboard-wrapper {
position: absolute;
left: 72px;
right: 64px;
bottom: 56px;
top: 684px;
}
.title, .title,
.title-en { .title-en {
margin-right: 76px; margin-right: 76px;
@ -313,13 +293,15 @@ onBeforeUnmount(() => {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: fixed; position: fixed;
left: 80px;
top: 190px;
width: 88px;
height: 88px;
left: 0;
right: 0;
margin: auto;
bottom: 242px;
width: 120px;
height: 120px;
z-index: 52; z-index: 52;
background: linear-gradient(90deg, #f6a62c 0%, #ffbc3f 100%);
border-radius: 12px;
background: linear-gradient(99.5deg, #f0b92b 0%, #f9d556 100%);
border-radius: 24px;
img { img {
width: 56px; width: 56px;
} }

BIN
src/components/Search/clear.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

BIN
src/components/Search/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

83
src/components/SearchResultItem/SearchResultItem.vue

@ -3,17 +3,10 @@
<div class="icon-wrapper"> <div class="icon-wrapper">
<img :src="config.sourceUrl + shop.logoUrl" class="icon" alt="" /> <img :src="config.sourceUrl + shop.logoUrl" class="icon" alt="" />
</div> </div>
<div class="item-right">
<div class="info">
<div class="top-info">
<p class="name">{{ switchLanguage(shop, 'shopName') }}</p>
<p class="address">{{ shop.houseNumber }}</p>
</div>
<div class="info-bottom">
<p class="desc">{{ switchLanguage(shop, 'industryFatherName') }}</p>
<img :src="config.sourceUrl + shop.industryUrl" class="desc-icon" alt="" />
</div>
</div>
<div class="item-bottom">
<div class="left">{{ switchLanguage(shop, 'shopName') }}</div>
<div class="right">{{ shop.floor }}</div>
</div> </div>
</div> </div>
</template> </template>
@ -39,62 +32,52 @@ function handleShop() {
<style lang="scss" scoped> <style lang="scss" scoped>
.item { .item {
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
padding: 0 24px;
width: 302px;
height: 72px;
background: rgba(255, 255, 255, 0.8);
border-radius: 12px;
width: 210px;
height: 200px;
background: rgba(255, 255, 255, 0.6);
border-radius: 8px;
margin-right: 8px; margin-right: 8px;
margin-bottom: 8px;
}
margin-top: 24px;
.icon-wrapper { .icon-wrapper {
width: 48px;
height: 48px;
display: flex;
width: 210px;
height: 160px;
background: #ffffff; background: #ffffff;
border-radius: 8px; border-radius: 8px;
padding: 4px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.04);
margin-right: 24px;
justify-content: center;
align-items: center;
.icon { .icon {
width: 100%;
height: 100%;
width: 120px;
height: 120px;
object-fit: contain; object-fit: contain;
} }
} }
.item-right {
flex: 1;
}
.top-info {
.item-bottom {
display: flex; display: flex;
width: 100%;
flex: 1;
padding: 0 12px;
align-items: center; align-items: center;
justify-content: space-between;
padding-bottom: 6px;
.name {
font-weight: 700;
font-size: 16px;
color: rgba(0, 0, 0, 0.6);
font-family: 'font_bold';
}
.address {
.left,
.right {
font-weight: 700; font-weight: 700;
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.4);
font-family: 'font_bold';
line-height: 16px;
color: rgba(0, 0, 0, 0.8);
} }
.left {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.info-bottom {
display: flex;
align-items: center;
.right {
width: 40px;
text-align: right;
} }
.desc {
font-size: 12px;
color: rgba(0, 0, 0, 0.6);
padding-right: 8px;
} }
.desc-icon {
width: 14px;
width: 14px;
} }
</style> </style>

63
src/components/SearchResultList/SearchResultList.vue

@ -2,11 +2,7 @@
<ScrollView :list="list" class="search-result-scroll" :scrollbar="true"> <ScrollView :list="list" class="search-result-scroll" :scrollbar="true">
<div class="scroll-result"> <div class="scroll-result">
<h1 class="title"> <h1 class="title">
{{ $t('pinpai') }}
<div>
<i>{{ $t('result') }}</i>
<b>{{ list.length }}</b>
</div>
搜索结果 <span class="meta">/ {{ list.length }}</span>
</h1> </h1>
<TransitionGroup name="zoom" tag="div" class="list"> <TransitionGroup name="zoom" tag="div" class="list">
<SearchResultItem :config="config" @click="handleShop" :shop="item" v-for="item of list" :key="item.shopId" /> <SearchResultItem :config="config" @click="handleShop" :shop="item" v-for="item of list" :key="item.shopId" />
@ -63,9 +59,10 @@ function handleActivity(item) {
<style lang="scss" scoped> <style lang="scss" scoped>
.search-result-scroll { .search-result-scroll {
position: relative; position: relative;
height: 1118px;
height: 842px;
overflow: hidden; overflow: hidden;
margin-left: 80px;
margin-left: 68px;
margin-right: 7px;
.scroll-result { .scroll-result {
padding-bottom: 200px; padding-bottom: 200px;
} }
@ -124,40 +121,42 @@ function handleActivity(item) {
} }
} }
.title { .title {
display: flex;
justify-content: space-between;
font-weight: 700;
font-style: normal;
font-weight: 900;
font-size: 24px; font-size: 24px;
line-height: 28px;
color: rgba(0, 0, 0, 0.8);
.meta {
font-weight: 500;
font-size: 20px;
line-height: 23px;
color: rgba(0, 0, 0, 0.6); color: rgba(0, 0, 0, 0.6);
font-family: 'font_bold';
margin-bottom: 24px;
padding-right: 80px;
i {
display: inline-block;
font-weight: 700;
color: rgba(0, 0, 0, 0.4);
font-family: 'font_bold';
font-size: 16px;
padding-right: 18px;
}
b {
display: inline-block;
font-weight: 700;
color: rgba(0, 0, 0, 0.6);
font-family: 'font_bold';
font-size: 24px;
} }
} }
:deep(.bscroll-vertical-scrollbar) { :deep(.bscroll-vertical-scrollbar) {
width: 6px !important;
background: rgba(0, 0, 0, 0.02) !important;
border-radius: 6px !important;
width: 48px !important;
background: center / 6px 250px no-repeat url(@/assets/images/scrollBar.png);
border-radius: 6px;
opacity: 1 !important; opacity: 1 !important;
height: 176px !important;
height: 250px !important;
&::after {
position: absolute;
content: '';
left: 0;
top: 120px;
margin: auto;
width: 48px;
height: 61px;
background: center / cover no-repeat url(@/assets/images/scrollHand.png);
}
.bscroll-indicator { .bscroll-indicator {
height: 95px !important; height: 95px !important;
width: 6px !important; width: 6px !important;
background: rgba(0, 0, 0, 0.1) !important;
left: 0;
right: 0;
margin: auto;
background: #ffffff !important;
border-radius: 6px !important; border-radius: 6px !important;
border: none !important; border: none !important;
} }

38
src/components/Tabs/Tabs.vue

@ -2,10 +2,7 @@
<div class="tabs-wrapper"> <div class="tabs-wrapper">
<div class="tab" :class="{ active: tabIdx === index }" @click="handleTab(index)" v-for="(item, index) of list" :key="item.name"> <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="" /> <img :src="tabIdx === index ? item.iconActive : item.icon" alt="" />
<div class="text-right">
<span class="zh">{{ item.name }}</span>
<span class="en">{{ item.nameEn }}</span>
</div>
{{ item.name }}
</div> </div>
</div> </div>
</template> </template>
@ -32,7 +29,7 @@ function handleTab(index) {
.tabs-wrapper { .tabs-wrapper {
display: flex; display: flex;
width: 100%; width: 100%;
height: 72px;
height: 64px;
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
border-radius: 12px; border-radius: 12px;
overflow: hidden; overflow: hidden;
@ -43,39 +40,16 @@ function handleTab(index) {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: rgba(0, 0, 0, 0.6);
&.active { &.active {
background: #ffffff; background: #ffffff;
box-shadow: inset 0px -4px 0px rgba(177, 189, 220, 0.1);
.zh {
color: rgba(0, 0, 0, 0.8); color: rgba(0, 0, 0, 0.8);
} }
.en {
color: rgba(0, 0, 0, 0.6);
}
}
}
.zh {
display: flex;
align-items: center;
text-align: center;
font-weight: 700;
font-size: 14px;
font-family: 'font_bold';
color: rgba(0, 0, 0, 0.4);
padding-bottom: 4px;
transition: color 0.2s;
}
.en {
font-size: 12px;
transform: scale(0.83);
transform-origin: 0 0;
text-transform: uppercase;
transition: color 0.2s;
color: rgba(0, 0, 0, 0.4);
} }
img { img {
width: 32px;
height: 32px;
width: 24px;
height: 24px;
margin-right: 12px; margin-right: 12px;
} }
} }

3
src/layouts/Dialog.vue

@ -21,8 +21,7 @@ function close() {
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 90; z-index: 90;
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(150px);
background: rgba(0, 0, 0, 0.6);
animation-duration: 0.2s; animation-duration: 0.2s;
} }
.masker { .masker {

2
src/views/Index/Index.vue

@ -108,7 +108,7 @@ function handleHot(item) {
.item { .item {
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 176px;
max-width: 176px;
height: 52px; height: 52px;
background: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.8);

Loading…
Cancel
Save