mall-applet1/pagesB/search/search.vue

52 lines
1.4 KiB
Vue
Raw Normal View History

<template>
<view>
<status-container titlet="搜索">
<view slot="content" style="margin: -20rpx 0rpx 0 0rpx;">
<view class="pad-x30 pad-s20" style="position: sticky;background-color: #f4f4f4;" :style="{top: padt+'px'}">
<view class=" radius30 pad-zy30 mar-x30 disac" style="background-color: #d8d8d8;">
<image src="/static/public/icon-searcht.png" mode="widthFix" style="width: 40rpx;height: 40rpx;"></image>
<input @confirm="goSearch" @focus="ifResult=false" v-model="keyword" class="width100 fon30 mar-z20" type="text" placeholder="搜索" style="height: 90rpx;color: #8c8c9b;" placeholder-style="color: #8c8c9b">
</view>
<view class="fon30 bold" v-if="keyword && ifResult">结果:{{keyword}}<text v-if="num" class="textc">{{num}}</text></view>
</view>
2022-05-26 10:35:10 +00:00
<list-one ref="list"></list-one>
</view>
</status-container>
</view>
</template>
<script>
import listOne from '@/components/list/list-one';
import pitera from '@/components/nothing/pitera';
export default {
components:{
listOne,
pitera
},
data() {
return {
padt:uni.getSystemInfoSync().statusBarHeight + 50,
2022-05-26 10:35:10 +00:00
windowHeigh:uni.getSystemInfoSync().windowHeight,
keyword:'',
num:11,
ifResult:true
}
},
2022-05-26 10:35:10 +00:00
onReachBottom(e) {
this.$refs.list.moreEv();
},
onLoad(op) {
if(op.keyword) this.keyword = op.keyword;
},
methods: {
goSearch(){
this.ifResult = true;
}
}
}
</script>
<style>
</style>