4 changed files with 226 additions and 260 deletions
@ -1,146 +1,40 @@ |
|||||
<template> |
<template> |
||||
<div class="view-container"> |
<div class="view-container"> |
||||
<div class="header-left"> |
|
||||
<h1 class="title">{{ title }}</h1> |
|
||||
<h2 class="sub">{{ subTitle }}</h2> |
|
||||
</div> |
|
||||
<div class="align-right" v-if="showInput && isUseSpeech"> |
|
||||
<div class="top-right"> |
|
||||
<img src="../assets/images/index/index_search.png" class="index-search-icon" alt="" /> |
|
||||
<div class="mock-input" @click="handleSearch"> |
|
||||
<p class="search">搜索</p> |
|
||||
<p class="search-en">search</p> |
|
||||
</div> |
|
||||
<img @click="handleVoice" src="../assets/images/guide/voice_white.png" class="index-voice-icon" alt="" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<img src="@/assets/images/mall_logo.png" class="mall-logo" alt="" /> |
|
||||
|
|
||||
|
<div :class="['bgTop', long ? 'long' : '', mid ? 'mid' : '']"></div> |
||||
<slot /> |
<slot /> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script setup> |
<script setup> |
||||
import { storeToRefs } from 'pinia' |
|
||||
import { useStore } from '@/store/root' |
|
||||
|
|
||||
defineProps({ |
defineProps({ |
||||
showInput: { |
|
||||
|
long: { |
||||
type: Boolean, |
type: Boolean, |
||||
default: true |
|
||||
|
default: false |
||||
}, |
}, |
||||
title: { |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
subTitle: { |
|
||||
type: String, |
|
||||
default: '' |
|
||||
|
mid: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
} |
} |
||||
}) |
}) |
||||
|
|
||||
const store = useStore() |
|
||||
const { isUseSpeech } = storeToRefs(store) |
|
||||
|
|
||||
function handleSearch() { |
|
||||
store.SET_SHOW_SEARCH(true) |
|
||||
} |
|
||||
|
|
||||
function handleVoice() { |
|
||||
store.SET_SHOW_SEARCH(true) |
|
||||
store.SET_SHOW_VOICE(true) |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
.view-container { |
.view-container { |
||||
width: 1080px; |
|
||||
height: 1920px; |
|
||||
} |
|
||||
.mall-logo { |
|
||||
position: absolute; |
|
||||
top: 56px; |
|
||||
right: 40px; |
|
||||
width: 108px; |
|
||||
z-index: 51; |
|
||||
} |
|
||||
.header-left { |
|
||||
position: relative; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
padding-left: 170px; |
|
||||
padding-right: 40px; |
|
||||
padding-top: 56px; |
|
||||
z-index: 51; |
|
||||
margin-bottom: 102px; |
|
||||
.title { |
|
||||
font-weight: 700; |
|
||||
font-family: 'font_bold'; |
|
||||
font-size: 48px; |
|
||||
color: var(--color-black-opacity-8); |
|
||||
margin-right: 32px; |
|
||||
} |
|
||||
.sub { |
|
||||
width: 100px; |
|
||||
font-weight: 700; |
|
||||
font-size: 24px; |
|
||||
line-height: 28px; |
|
||||
font-family: 'font_bold'; |
|
||||
text-transform: uppercase; |
|
||||
color: var(--color-black-opacity-6); |
|
||||
} |
|
||||
} |
|
||||
.align-right { |
|
||||
display: flex; |
display: flex; |
||||
justify-content: flex-end; |
|
||||
} |
|
||||
.top-right { |
|
||||
position: relative; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
width: 365px; |
|
||||
height: 88px; |
|
||||
background: var(--color-black-opacity-05); |
|
||||
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-right: 40px; |
|
||||
&::before { |
|
||||
position: absolute; |
|
||||
content: ''; |
|
||||
width: 2px; |
|
||||
height: 30px; |
|
||||
left: 76px; |
|
||||
top: 29px; |
|
||||
background: var(--color-black-opacity-2); |
|
||||
} |
|
||||
.index-search-icon { |
|
||||
width: 32px; |
|
||||
height: 32px; |
|
||||
margin-right: 42px; |
|
||||
margin-left: 24px; |
|
||||
} |
|
||||
.mock-input { |
|
||||
width: 298px; |
|
||||
} |
|
||||
.search { |
|
||||
font-weight: 700; |
|
||||
font-size: 16px; |
|
||||
line-height: 28px; |
|
||||
font-family: 'font_bold'; |
|
||||
color: var(--color-black-opacity-6); |
|
||||
} |
|
||||
.search-en { |
|
||||
font-size: 12px; |
|
||||
font-weight: 700; |
|
||||
font-family: 'font_bold'; |
|
||||
text-transform: uppercase; |
|
||||
color: var(--color-black-opacity-4); |
|
||||
|
flex-direction: column; |
||||
|
width: 100vw; |
||||
|
height: 100vh; |
||||
|
background: #dee6f6; |
||||
|
.bgTop { |
||||
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 100%); |
||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.8); |
||||
|
height: 408px; |
||||
|
&.long { |
||||
|
height: 570px; |
||||
|
} |
||||
|
&.mid { |
||||
|
height: 515px; |
||||
} |
} |
||||
.index-voice-icon { |
|
||||
width: 132px; |
|
||||
height: 78px; |
|
||||
margin-right: 5px; |
|
||||
} |
} |
||||
} |
} |
||||
</style> |
</style> |
||||
|
|||||
Loading…
Reference in new issue