lilishop-uniapp/pages/tabbar/home/template/tpl_search.vue

56 lines
1.1 KiB
Vue
Raw Normal View History

2021-05-13 11:03:32 +08:00
<template>
<div class="layout">
<div class="search" @click="handleSearch">
<u-icon name="search"></u-icon>
{{ res.list[0].title }}
</div>
2022-10-11 19:09:22 +08:00
<div slot="right" open-type="contact" class="navbar-right message" @click="linkMsgDetail" style="border-style:none;background:rgb(234,234,234);" >
<image style="width:53rpx;height:53rpx;margin-top:6rpx;" src="@/static/img/title.png"></image>
</div>
2021-05-13 11:03:32 +08:00
</div>
</template>
<script>
export default {
2021-05-24 15:49:22 +08:00
title:"搜索栏",
2021-05-13 11:03:32 +08:00
props: ["res"],
methods: {
2022-10-11 19:09:22 +08:00
linkMsgDetail(){
uni.navigateTo({
url:`/pages/tabbar/home/title`
})
},
2021-05-13 11:03:32 +08:00
handleSearch() {
uni.navigateTo({
url: "/pages/navigation/search/searchPage",
});
},
},
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.search {
height: 64rpx;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
background: #ededed;
}
.layout {
background: #fff;
padding: 0 16rpx;
2022-10-11 19:09:22 +08:00
position: relative;
}
.navbar-right{
position: absolute;
top: 0;
// right: 0;
}
.message{
right:40rpx;
2021-05-13 11:03:32 +08:00
}
</style>