pull/8/head
ldh 2023-04-12 14:14:24 +08:00
commit cd86e4f7b6
2 changed files with 9 additions and 2 deletions

View File

@ -120,7 +120,7 @@
:src="sheep.$url.cdn(item.content.url)" :src="sheep.$url.cdn(item.content.url)"
:height="200" :height="200"
:width="200" :width="200"
mode="scaleToFill" mode="aspectFill"
></su-image> ></su-image>
</view> </view>
</template> </template>
@ -707,7 +707,7 @@
} }
.imgred, .imgred,
img { img {
width: 100% !important; width: 100%;
} }
} }
} }

View File

@ -26,6 +26,7 @@
cancelButton="none" cancelButton="none"
clearButton="none" clearButton="none"
@confirm="onSearch" @confirm="onSearch"
v-model="state.searchVal"
/> />
<view class="keyword-link ss-flex"> <view class="keyword-link ss-flex">
<view v-for="(item, index) in data.keywords" :key="index"> <view v-for="(item, index) in data.keywords" :key="index">
@ -129,6 +130,9 @@
function onSearch(e) { function onSearch(e) {
if (e.value) { if (e.value) {
sheep.$router.go('/pages/goods/list', { keyword: e.value }); sheep.$router.go('/pages/goods/list', { keyword: e.value });
setTimeout(() => {
state.searchVal = '';
}, 100);
} }
} }
</script> </script>
@ -137,14 +141,17 @@
.border-content { .border-content {
border: 2rpx solid #eee; border: 2rpx solid #eee;
} }
.search-content { .search-content {
flex: 1; flex: 1;
// height: 80rpx; // height: 80rpx;
position: relative; position: relative;
.search-icon { .search-icon {
font-size: 38rpx; font-size: 38rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
.keyword-link { .keyword-link {
position: absolute; position: absolute;
right: 16rpx; right: 16rpx;