falvpingtai/src/components/indexhead.vue
2019-11-28 17:54:59 +08:00

113 lines
2.2 KiB
Vue

<template>
<div>
<van-popup v-model="show" position="top" :style="{ height: '2.82rem' }">
<div style="height:0.88rem"></div>
<div class="mnuelist">
<div>首页</div>
<div>我的主页</div>
<div>退出登录</div>
</div>
</van-popup>
<div class="head">
<img class="logo" src alt srcset />
<div class="search">
<img src alt />
<input type="text" placeholder="搜索" v-on:change="shuru" v-model="serch" />
</div>
<div class="mnue" @click="isshow">
<div></div>
<div></div>
<div></div>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.mnuelist {
padding: 26px;
height: 194px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
flex-direction: column;
color: #333;
font-size: 24px;
}
.head {
position: fixed;
top: 0;
z-index: 9999;
width: 100%;
height: 88px;
background-color: #fff;
display: flex;
align-items: center;
.logo {
width: 115px;
height: 37px;
background-color: #000;
display: block;
margin-left: 30px;
}
.search {
margin-left: 24px;
width: 485px;
height: 60px;
background-color: #f0f0f0;
box-sizing: border-box;
border: 1px solid rgba(233, 233, 233, 1);
border-radius: 30px;
display: flex;
align-items: center;
> img {
margin-left: 23px;
width: 30px;
height: 30px;
background-color: #000;
}
> input {
margin-left: 21px;
color: #333;
font-size: 24px;
height: 26px;
border: none;
background-color: #f0f0f0;
}
}
.mnue {
display: flex;
flex-direction: column;
height: 15px;
width: 24px;
justify-content: space-between;
margin-left: 42px;
> div {
width: 100%;
height: 3px;
background-color: #95998f;
}
}
}
</style>
<script>
export default {
name: "indexhead",
data() {
return {
show: false,
serch: ""
};
},
methods: {
isshow() {
this.show = !this.show;
},
shuru() {
window.console.log(this.serch);
this.$router.push({
path: `/indexfind?word=`+this.serch
});
}
}
};
</script>