You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

68 lines
1.7 KiB

<template>
<div class="row">
<div class="back" :style="{ backgroundImage: `url(${theme.images.back})` }" v-if="$route.path !== '/index'" @click="() => $router.push('/index')"></div>
<div class="bar" @click="handleSearch">
<div class="icon"></div>
<div class="stick"></div>
<div class="placeholder">精确查询品牌/公共设施</div>
</div>
</div>
</template>
<script setup>
import { useStore } from '@/store/root'
import { storeToRefs } from 'pinia'
const store = useStore()
const handleSearch = () => store.SET_SHOW_SEARCH(true)
const { theme } = storeToRefs(store)
</script>
<style lang="scss" scoped>
.row {
position: fixed;
top: 260px;
left: 68px;
right: 68px;
height: 100px;
display: flex;
z-index: 100;
.back {
width: 130px;
height: 100px;
margin-right: 40px;
background: center / cover no-repeat;
box-shadow: 0px 15px 24px rgba(0, 0, 0, 0.05);
border-radius: var(--searchBar-backBorderRadius);
}
.bar {
flex: 1;
height: 100px;
background: var(--searchBar-background);
border: var(--searchBar-border);
box-shadow: 0px 15px 24px rgba(0, 0, 0, 0.05);
border-radius: var(--searchBar-borderRadius);
display: flex;
padding-left: 40px;
align-items: center;
.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-family: 'HarmonyOS Sans SC';
font-style: normal;
font-weight: 700;
font-size: 20px;
line-height: 23px;
color: var(--searchBar-placeholderColor);
}
}
}
</style>