Files

94 lines
1.6 KiB
Vue
Raw Permalink Normal View History

2025-11-14 11:39:33 +08:00
<template>
<view class="asset-list">
<view
v-for="item in list"
2026-01-15 17:18:24 +08:00
:key="item.assetsNo"
2025-11-14 11:39:33 +08:00
class="asset-card"
@click="onClick(item)"
>
2026-01-15 17:18:24 +08:00
<image class="cover" :src="'https://www.wujiaguotou.com' + item.coverImgUrl" mode="aspectFill" />
2025-11-14 11:39:33 +08:00
<view class="info">
2026-01-15 17:18:24 +08:00
<text class="name">{{ item.assetsName }}</text>
<text class="address">{{ item.assetsAddress }}</text>
2025-11-14 11:39:33 +08:00
</view>
<u-icon name="arrow-right" size="28" color="#999" class="arrow" />
</view>
2026-01-15 17:18:24 +08:00
<u-empty v-if="list.length === 0" mode="list" text="暂无资产数据" />
2025-11-14 11:39:33 +08:00
</view>
</template>
<script>
export default {
name: "AssetList",
props: {
list: {
type: Array,
default: () => [],
2026-01-15 17:18:24 +08:00
}
2025-11-14 11:39:33 +08:00
},
emits: ["click"],
2026-01-15 17:18:24 +08:00
onLoad(options) {
},
2025-11-14 11:39:33 +08:00
methods: {
onClick(item) {
this.$emit("click", item);
},
},
};
</script>
<style lang="scss" scoped>
.asset-list {
padding: 20rpx;
}
.asset-card {
display: flex;
align-items: center;
background: #fff;
padding: 20rpx;
margin-bottom: 20rpx;
border-radius: 16rpx;
position: relative;
box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05);
.cover {
width: 160rpx;
height: 120rpx;
border-radius: 12rpx;
margin-right: 20rpx;
background-color: #f0f0f0;
}
.info {
flex: 1;
display: flex;
flex-direction: column;
.name {
font-size: 28rpx;
font-weight: 500;
color: #333;
margin-bottom: 6rpx;
}
.address {
font-size: 24rpx;
color: #666;
margin-bottom: 4rpx;
}
.status {
font-size: 24rpx;
color: #409eff;
}
}
.arrow {
margin-left: 10rpx;
}
}
</style>