<template> <div class="partTitleHM">公众建议</div> <div class="ConstrucClass"> <Vue3SeamlessScroll :list="tableData" :hover="true" class="scroll" :limitScrollNum="2"> <div class="MainBox" v-for="(item, index) in tableData" :key="index"> <div class="AvatarAppearance"> <div class="zp"> <img src="@/assets/images/login/user.png" alt="" class="txclass" /> </div> <div class="NameTime"> <div class="Namea">{{ item.wechatName }}</div> <div class="Timea">{{ item.publishTime || '--' }}</div> </div> </div> <div class="below"> <div class="belowNr">{{ item.opinion }}</div> <div class="belowZp"> <img :src="item1.url" v-for="(item1, index1) in item.filelist" :key="index1" /> </div> </div> </div> </Vue3SeamlessScroll> </div> </template> <script setup> import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'; import { peopleOpinionPage } from '@/api/publicService/index'; const tableData = ref([]); const photo = ref([]); const allData = reactive({ zp: [], queryParams: { pageNum: 1, pageSize: 10, }, }); const { queryParams } = toRefs(allData); /** 获取查询数据列表 */ function getDataList() { peopleOpinionPage(queryParams.value).then(response => { tableData.value = response.data; }); } onMounted(() => { getDataList(); }); </script> <style lang="scss" scoped> .ConstrucClass { width: 460px; height: 30%; background: #004565; overflow: auto; .MainBox { width: 95%; background: #325ca3c4; opacity: 0.8; margin: auto; margin-bottom: 5px; .AvatarAppearance { width: 100%; display: flex; align-items: center; margin: 5px; .zp { width: 20%; height: 60px; .txclass { width: 50px; height: 50px; border-radius: 25px; position: relative; top: 5px; left: 18px; } } .NameTime { flex: 1; height: 60px; .Namea { width: 100%; height: 30px; line-height: 30px; color: #b3e3ff; font-size: 15px; font-family: SourceHanSansCN-Medium; font-weight: 400; } .Timea { width: 100%; height: 30px; line-height: 30px; color: #5b93eb; font-size: 16px; font-family: SourceHanSansCN-Medium; font-weight: 400; } } } .below { width: 100%; .belowNr { width: 95%; color: #b3e3ff; font-size: 15px; font-family: SourceHanSansCN-Medium; font-weight: 400; margin-left: 15px; } .belowZp { display: flex; margin: 10px 0px 10px 15px; img { width: 30%; margin-right: 1%; margin-bottom: 5px; } } } } .scroll { width: 100%; height: calc(100% - 2%); overflow: hidden; display: inline-block; // background: red; } } </style>