123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <template>
- <view class="back">
- <!-- 搜索 -->
- <view class="u-flex u-row-between">
- <view class="" style="width: 622rpx;">
- <u-search @blur='blur' @focus='focus' @click="search" placeholder="请输入物品名称" v-model="keyword"
- :showAction='false'></u-search>
- </view>
- <text @click="clear" v-if="keyword==''">{{i18n.Cancel}}</text>
- <text @click="enter" v-else>{{i18n.enter}}</text>
- </view>
- <view v-if="blurshow==false && keyword==''" class="title" style="margin-top: 32rpx;">
- {{i18n.Popularshipment}}
- </view>
- <view v-if="blurshow==false && keyword==''" class="u-flex " style="column-gap: 20rpx;flex-wrap: wrap;">
- <view class="tabs" v-for="(item,idx) in 8" :key="idx" @click="select">
- 行李
- </view>
- </view>
- <scroll-view v-if="blurshow && keyword" :scroll-y='true'>
- <view class="searchitem" v-for="(item,index) in 6">草莓</view>
- </scroll-view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- keyword: '',
- blurshow: false, //是否显示热门寄件
- };
- },
- computed: {
- i18n() {
- return this.$t('index')
- }
- },
- methods: {
- //取消
- clear() {
- uni.navigateBack()
- },
- enter() {
- },
- search() {
- },
- // 失去焦点
- blur() {
- this.blurshow = false
- },
- //获取焦点
- focus() {
- this.blurshow = true
- },
- //选中
- select() {
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .searchitem{
- height: 98rpx;
- border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
- line-height: 98rpx;
- }
- .title {
- font-family: PingFangSC, PingFang SC;
- font-weight: 500;
- font-size: 28rpx;
- color: #222222;
- line-height: 40rpx;
- text-align: left;
- font-style: normal;
- }
- .tabs {
- height: 58rpx;
- background: #F5F5F5;
- border-radius: 36rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
- color: #333333;
- // line-height: 58rpx;
- text-align: center;
- font-style: normal;
- display: inline;
- padding: 12rpx 24rpx;
- box-sizing: border-box;
- margin-top: 24rpx;
- }
- .back {
- padding: 28rpx 20rpx !important;
- background-color: #fff;
- min-height: calc(100vh - 44rpx);
- }
- </style>
|