import { Cell, CellGroup, Skeleton, SkeletonParagraph, Image } from 'vant'; import { defineComponent, onMounted, reactive, watch, ref } from 'vue'; import styles from './detail.module.less'; import SwiperClass, { Navigation, Thumbs, Pagination } from 'swiper'; import { Swiper, SwiperSlide } from 'swiper/vue'; import 'swiper/css'; import 'swiper/css/navigation'; import 'swiper/css/thumbs'; import 'swiper/css/pagination'; import iconVideoDefault from '@common/images/icon-video-r.png'; import { checkFile } from '@/helpers/toolsValidate'; import palyBtn from './images/palyBtn.png'; import arrayIcon from './images/array-icon.png'; export default defineComponent({ name: 'detail-swiper', emits: ['showImageToas'], props: { item: { type: Object, default: {} } }, setup(props, { slots, emit }) { const forms = reactive({ loading: false }); const thumbsSwiper = ref(); const setThumbsSwiper = (swiper: SwiperClass) => { thumbsSwiper.value = swiper; console.log(thumbsSwiper.value, 'setThumbsSwiper'); }; const modules = [Navigation, Thumbs, Pagination]; onMounted(() => {}); return () => ( <> {props.item.attachmentUrl.length > 0 ? (
{props.item.attachmentUrl.map((i: any, index: number) => (
{ emit('showImageToas', { imagePreview: props.item.attachmentUrl, imageShow: true, startPosition: index }); // forms.imagePreview = item.attachmentUrl; // forms.imageShow = true; // forms.startPosition = index; }}> {checkFile(i, 'image') ? ( ) : (
)} {props.item.attachmentUrl.length > 4 && index === 3 ? (
+{props.item.attachmentUrl.length - 4}
) : ( '' )}
))}
{ emit('showImageToas', { imagePreview: props.item.attachmentUrl, imageShow: true, startPosition: 0 }); }}>

{props.item.attachmentUrl.map((i: any, index: number) => (
{checkFile(i, 'image') ? ( ) : (
)} {props.item.attachmentUrl.length > 4 && index === 3 ? (
+{props.item.attachmentUrl.length - 4}
) : ( '' )}
))}
) : null} ); } });