123
This commit is contained in:
parent
6ec8c46c55
commit
9e6788dbb2
81
app/pages/home/components/ItemList/index.vue
Normal file
81
app/pages/home/components/ItemList/index.vue
Normal file
@ -0,0 +1,81 @@
|
||||
<script setup>
|
||||
|
||||
import Column from "@/pages/home/components/Column/index.vue";
|
||||
import {artworkList} from "@/api/goods/index.js";
|
||||
import {homeStore} from "~/stores/goods/index.js";
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const {fullLive,actionDetails,itemList} = homeStore();
|
||||
const list = ref([{
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/f7b65e23-ce21-41b4-8e58-9e6dc6950727.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/41eceb23-d168-4049-ae8e-48c5328b192f.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: '',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}, {
|
||||
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
||||
title: '张天赐 | 日出而作,日落而息',
|
||||
startingPrice: 'RMB 1,000',
|
||||
transactionPrice: 'RMB 10,000',
|
||||
}])
|
||||
const columns = computed(() => {
|
||||
const result = [[], []];
|
||||
// 确保 itemList 有值
|
||||
if (itemList.value && itemList.value.length > 0) {
|
||||
itemList.value.forEach((item, index) => {
|
||||
result[index % 2].push(item);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
});
|
||||
const loadData = async () => {
|
||||
// 加载数据逻辑...
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="px-[16px] pt-[16px]">
|
||||
<van-pull-refresh>
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="loadData">
|
||||
<div class="w-full flex gap-[16px]">
|
||||
<Column v-for="(column, colIndex) in columns" :key="colIndex" :items="column" />
|
||||
</div>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user