myCollection.vue 3.0 KB
<template>
	<view>
		<view class="misslist">
			<custom-waterfalls-flow :value="list" :columnSpace="1.5" :seat="2" @edit="edit" @del="del"
				@wapperClick="wapperClick" @imageClick="wapperClick">
				<template v-slot:default="item">
					<view class="item">
						<view class="title">{{item.title}}</view>
						<view class="desc">{{item.desc}}</view>
						<view class="desc flexA">
							张三
							<view class="money">
								<text style="font-size: 20rpx;">¥</text>120
							</view>
						</view>
					</view>
				</template>
			</custom-waterfalls-flow>
		</view>
	</view>
</template>


<script>
	export default {
		data() {
			return {
				list2: [{
					name: '全部',
				}, {
					name: '售卖中',
				}, {
					name: '已售出'
				}],
				list: [{
						image: 'https://via.placeholder.com/200x500.png/ff0000',
						title: '比特币',
						desc: '所属分类:1 文博收藏品'
					}, {
						image: 'https://via.placeholder.com/200x300.png/9400D3',
						title: '我是标题4',
						desc: '描述描述描述描述描述描述描述描述4'
					},
					{
						image: 'https://via.placeholder.com/100x240.png/B0E0E6',
						title: '我是标题5',
						desc: '描述描述描述描述描述描述描述描述5'
					},
					{
						image: 'https://via.placeholder.com/140x280.png/7FFFAA',
						title: '我是标题6',
						desc: '描述描述描述描述描述描述描述描述6'
					},
					{
						image: 'https://via.placeholder.com/40x60.png/EEE8AA',
						title: '我是标题7',
						desc: '描述描述描述描述描述描述描述描述7'
					}
				]
			}
		},
		methods: {
			edit(e) {
				console.log('edit', e);
			},
			del(e) {
				console.log('del', e);
			},
			wapperClick(item) {
				console.log('单项点击事件', item)
			}
		},
		// 触底触发
		onReachBottom() {
			// if(that.page >= that.lastPage) return
			// that.page=that.page+1 
			// this.getForum()
			this.list = this.list.concat(this.list)
		},
	}
</script>

<style lang="less">
	page {
		background: #f6f6f6;
	}

	.misslist {
		padding: 32rpx 30rpx;
		// margin-top: 24rpx;
	}

	.u-sticky {
		top: 0 !important;
	}

	.item {
		padding: 24rpx;

		.title {
			color: rgba(0, 0, 0, 0.9);
			font-size: 26rpx;
			font-weight: 700;
		}

		.desc {
			justify-content: space-between;
			color: rgba(0, 0, 0, 0.6);
			font-size: 24rpx;

			.money {
				color: #F85317;
				font-size: 32rpx;
				font-weight: 700;
			}
		}

		.bot {
			display: flex;
			justify-content: flex-end;

			image {
				width: 40rpx;
				height: 40rpx;
			}
		}
	}

	.topState {
		z-index: 1;
		position: absolute;
		left: 0;
		top: 0;
		width: 132rpx;
		height: 56rpx;
		border-radius: 12rpx 0 24rpx 0;
		opacity: 1;
		background: rgba(254, 208, 0, 1);
	}

	.Sale {}

	.Sold {
		background: rgba(218, 218, 218, 1);
		color: rgba(0, 0, 0, 0.9);
		font-size: 26rpx;
	}
</style>