修改bug

This commit is contained in:
A1300399510
2023-07-28 18:52:25 +08:00
parent 088e684466
commit 1e74a491ce
5 changed files with 22 additions and 25 deletions

View File

@@ -19,9 +19,7 @@
<img src="../../assets/img/detail/imageArrowIcon.svg" class="image-arrow-icon left-arrow" @click="prev" alt="">
<img src="../../assets/img/detail/imageArrowIcon.svg" class="image-arrow-icon right-arrow" @click="next" alt="">
</div>
<div class="tab-text">
{{ `${imageTab + 1}/${list.length}` }}
</div>
<div class="tab-text">{{ `${imageTab + 1}/${list.length}` }}</div>
<div class="dis-f jus-x al-item">
<div class="list-img-box dis-f al-item jus-x">
<div v-for="(item, i) in list" :key="i" @click="watchSet(i)" class="pos-r" style="margin-bottom: 10px;">
@@ -42,7 +40,7 @@
</template>
<script setup>
import { reactive, onMounted, ref, defineProps, watchEffect } from 'vue'
import { reactive, onMounted, ref, defineProps, watchEffect, watch } from 'vue'
// type 的类型代表 attachment 图片 videos 视频 lives 直播
const props = defineProps({
//url:展示图 thumbnail:缩略图
@@ -95,11 +93,14 @@ onMounted(() => {
watchEffect(() => {
show = props.show
list.value = props.list
if (props.index >= 0) carousel.value.setActiveItem(props.index)
// carousel.value.setActiveItem(props.index)
})
})
watch(() => props.index, (newValue, oldValue) => {
imageTab.value = newValue;
});
</script>
<style scoped>
img {