|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<view class="exhibit-recommend">
|
|
|
<view class="exhibit-list">
|
|
|
- <template v-for="(item, index) in [1, 2, 3, 4]">
|
|
|
- <view class="exhibit-item" hover-class="active" :key="index" @click="onClickExhibit(item)">
|
|
|
+ <template v-for="(item, index) in [1, 2, 3, 4, 5, 6, 7, 8]">
|
|
|
+ <view v-if="index < limit" class="exhibit-item" hover-class="active" :key="index" @click="onClickExhibit(item)">
|
|
|
<view class="exhibit-image">
|
|
|
<image src="https://oss.starify.cn/prod/starify/up/0001000075/20241113/67343f1c494de.png?x-oss-process=image/resize,w_400" mode="aspectFit"/>
|
|
|
</view>
|
|
@@ -22,8 +22,20 @@
|
|
|
},
|
|
|
components: {
|
|
|
},
|
|
|
+ props: {
|
|
|
+ limit: Number
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ limit(val) {
|
|
|
+ console.log("limit")
|
|
|
+ if (val === 8) {
|
|
|
+ this.$emit('show-all')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
created() {
|