'商品列表和详情页接上接口'
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 商品网格滚动区 -->
|
||||
<scroll-view scroll-y class="product-scroll" @scrolltolower="onLoadMore">
|
||||
<scroll-view scroll-y class="product-scroll">
|
||||
<view class="product-grid">
|
||||
<view
|
||||
class="product-card"
|
||||
@@ -89,8 +89,7 @@ export default {
|
||||
onTapProduct(item) { this.$emit('product-click', item) },
|
||||
onPrev() { if (this.current > 1) this.$emit('page-change', this.current - 1) },
|
||||
onNext() { if (this.current < this.totalPages) this.$emit('page-change', this.current + 1) },
|
||||
onGoPage(page) { this.$emit('page-change', page) },
|
||||
onLoadMore() { this.$emit('load-more') }
|
||||
onGoPage(page) { this.$emit('page-change', page) }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
placeholder-class="search-placeholder"
|
||||
:value="keyword"
|
||||
@input="onInput"
|
||||
@blur="onBlur"
|
||||
/>
|
||||
</view>
|
||||
<view class="filter-btn" @tap="onFilter">
|
||||
@@ -31,6 +32,9 @@ export default {
|
||||
onInput(e) {
|
||||
this.$emit('input', e.detail.value)
|
||||
},
|
||||
onBlur() {
|
||||
this.$emit('blur')
|
||||
},
|
||||
onFilter() {
|
||||
this.$emit('filter')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user