修改图片预览

This commit is contained in:
A1300399510
2023-07-27 15:41:30 +08:00
parent bee5f42a99
commit a20164b8fe
3 changed files with 43 additions and 33 deletions

View File

@@ -19,7 +19,6 @@
<el-carousel :autoplay="false" arrow="never" indicator-position="none" ref="remarkCaruselUp"
@change="carouselChange">
<el-carousel-item class="flexcenter" v-for="(item, index) in allCarouselsData">
<img v-if="index >= carouselIndex - 1 && index <= carouselIndex + 1" class="img"
:src="item['image'] || item['imageurl']" @click="cloaseImageShow(allCarouselsData)">
</el-carousel-item>
@@ -446,6 +445,16 @@ const init = () => {
proxy.$get("/tenement/pc/api/apartment/details", { uniqid }).then(res => {
if (res.code != 200) return
let data = res.data
data['roomList'].forEach(element => {
element['images'].forEach(element => {
element['type'] = 'attachment'
})
element['videos'].forEach(element => {
element['type'] = 'videos'
})
})
roomList.value = data['roomList']
data['info']['coordinate'] = data['info']['coordinate'].split(',').map(item => {
return +item
@@ -679,8 +688,6 @@ const handleScroll = () => {
}
const indicateTypeState = () => {
console.log("carouselsconfig", carouselsconfig);
let total = 0 // 累计
for (const key in carouselsconfig.value) {
if (carouselsconfig.value[key]['amount'] > 0) total++