|
@@ -34,113 +34,118 @@ export default defineComponent({
|
|
|
|
|
|
return () => (
|
|
|
<>
|
|
|
- <div class={styles.progItemList}>
|
|
|
- <Swiper
|
|
|
- class="topSwiper"
|
|
|
- style={{
|
|
|
- '--swiper-navigation-color': '#fff',
|
|
|
- '--swiper-pagination-color': '#fff'
|
|
|
- }}
|
|
|
- modules={modules}
|
|
|
- space-between={10}
|
|
|
- pagination={true}
|
|
|
- thumbs={{ swiper: thumbsSwiper.value }}>
|
|
|
- {props.item.attachmentUrl.map((i: any, index: number) => (
|
|
|
- <SwiperSlide class="slide">
|
|
|
- <div
|
|
|
- class={styles.photo}
|
|
|
- onClick={() => {
|
|
|
- emit('showImageToas', {
|
|
|
- imagePreview: props.item.attachmentUrl,
|
|
|
- imageShow: true,
|
|
|
- startPosition: index
|
|
|
- });
|
|
|
- // forms.imagePreview = item.attachmentUrl;
|
|
|
- // forms.imageShow = true;
|
|
|
- // forms.startPosition = index;
|
|
|
- }}>
|
|
|
- {checkFile(i, 'image') ? (
|
|
|
- <Image src={i + '@base@tag=imgScale'} fit="cover" />
|
|
|
- ) : (
|
|
|
- <div class={styles.videoWErap}>
|
|
|
- <Image src={palyBtn} class={styles.palyBtn}></Image>
|
|
|
- <video
|
|
|
- style={{ backgroundColor: '#F8F8F8' }}
|
|
|
- poster={iconVideoDefault}
|
|
|
- src={i + '#t=1,4'}
|
|
|
- />
|
|
|
- </div>
|
|
|
- )}
|
|
|
-
|
|
|
- {props.item.attachmentUrl.length > 4 && index === 3 ? (
|
|
|
- <div class={styles.photoMore}>
|
|
|
- +{props.item.attachmentUrl.length - 4}
|
|
|
- </div>
|
|
|
- ) : (
|
|
|
- ''
|
|
|
- )}
|
|
|
- </div>
|
|
|
- </SwiperSlide>
|
|
|
- ))}
|
|
|
- </Swiper>
|
|
|
- <div class={styles.thumbsWrap}>
|
|
|
- <div
|
|
|
- class={styles.thumbsMore}
|
|
|
- onClick={() => {
|
|
|
- emit('showImageToas', {
|
|
|
- imagePreview: props.item.attachmentUrl,
|
|
|
- imageShow: true,
|
|
|
- startPosition: 0
|
|
|
- });
|
|
|
- }}>
|
|
|
- <p>全</p>
|
|
|
- <p>部</p>
|
|
|
-
|
|
|
- <Image class={styles.arrayIcon} src={arrayIcon}></Image>
|
|
|
- </div>
|
|
|
+ {props.item.attachmentUrl.length > 0 ? (
|
|
|
+ <div class={styles.progItemList}>
|
|
|
<Swiper
|
|
|
- class="thumbs-swiper"
|
|
|
+ class="topSwiper"
|
|
|
+ style={{
|
|
|
+ '--swiper-navigation-color': '#fff',
|
|
|
+ '--swiper-pagination-color': '#fff'
|
|
|
+ }}
|
|
|
modules={modules}
|
|
|
space-between={10}
|
|
|
- slides-per-view={4}
|
|
|
- watch-slides-progress={true}
|
|
|
- freeMode={true}
|
|
|
- onSwiper={setThumbsSwiper}>
|
|
|
- {props.item.attachmentUrl.map(
|
|
|
- (i: any, index: number) =>
|
|
|
- index <= 3 && (
|
|
|
- <SwiperSlide class="slide">
|
|
|
- <div class={styles.photo}>
|
|
|
- {checkFile(i, 'image') ? (
|
|
|
- <Image
|
|
|
- src={i + '@base@tag=imgScale&w=120'}
|
|
|
- fit="cover"
|
|
|
- />
|
|
|
- ) : (
|
|
|
- <div class={styles.videoSmallWErap}>
|
|
|
- <Image src={palyBtn} class={styles.playBtn}></Image>
|
|
|
- <video
|
|
|
- style={{ backgroundColor: '#F8F8F8' }}
|
|
|
- poster={iconVideoDefault}
|
|
|
- src={i + '#t=1,4'}
|
|
|
- />
|
|
|
- </div>
|
|
|
- )}
|
|
|
+ pagination={true}
|
|
|
+ thumbs={{ swiper: thumbsSwiper.value }}>
|
|
|
+ {props.item.attachmentUrl.map((i: any, index: number) => (
|
|
|
+ <SwiperSlide class="slide">
|
|
|
+ <div
|
|
|
+ class={styles.photo}
|
|
|
+ onClick={() => {
|
|
|
+ emit('showImageToas', {
|
|
|
+ imagePreview: props.item.attachmentUrl,
|
|
|
+ imageShow: true,
|
|
|
+ startPosition: index
|
|
|
+ });
|
|
|
+ // forms.imagePreview = item.attachmentUrl;
|
|
|
+ // forms.imageShow = true;
|
|
|
+ // forms.startPosition = index;
|
|
|
+ }}>
|
|
|
+ {checkFile(i, 'image') ? (
|
|
|
+ <Image src={i + '@base@tag=imgScale'} fit="cover" />
|
|
|
+ ) : (
|
|
|
+ <div class={styles.videoWErap}>
|
|
|
+ <Image src={palyBtn} class={styles.palyBtn}></Image>
|
|
|
+ <video
|
|
|
+ style={{ backgroundColor: '#F8F8F8' }}
|
|
|
+ poster={iconVideoDefault}
|
|
|
+ src={i + '#t=1,4'}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
|
|
|
- {props.item.attachmentUrl.length > 4 && index === 3 ? (
|
|
|
- <div class={styles.photoMore}>
|
|
|
- +{props.item.attachmentUrl.length - 4}
|
|
|
- </div>
|
|
|
- ) : (
|
|
|
- ''
|
|
|
- )}
|
|
|
+ {props.item.attachmentUrl.length > 4 && index === 3 ? (
|
|
|
+ <div class={styles.photoMore}>
|
|
|
+ +{props.item.attachmentUrl.length - 4}
|
|
|
</div>
|
|
|
- </SwiperSlide>
|
|
|
- )
|
|
|
- )}
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ </SwiperSlide>
|
|
|
+ ))}
|
|
|
</Swiper>
|
|
|
+ <div class={styles.thumbsWrap}>
|
|
|
+ <div
|
|
|
+ class={styles.thumbsMore}
|
|
|
+ onClick={() => {
|
|
|
+ emit('showImageToas', {
|
|
|
+ imagePreview: props.item.attachmentUrl,
|
|
|
+ imageShow: true,
|
|
|
+ startPosition: 0
|
|
|
+ });
|
|
|
+ }}>
|
|
|
+ <p>全</p>
|
|
|
+ <p>部</p>
|
|
|
+
|
|
|
+ <Image class={styles.arrayIcon} src={arrayIcon}></Image>
|
|
|
+ </div>
|
|
|
+ <Swiper
|
|
|
+ class="thumbs-swiper"
|
|
|
+ modules={modules}
|
|
|
+ space-between={10}
|
|
|
+ slides-per-view={4}
|
|
|
+ watch-slides-progress={true}
|
|
|
+ freeMode={true}
|
|
|
+ onSwiper={setThumbsSwiper}>
|
|
|
+ {props.item.attachmentUrl.map(
|
|
|
+ (i: any, index: number) =>
|
|
|
+ index <= 3 && (
|
|
|
+ <SwiperSlide class="slide">
|
|
|
+ <div class={styles.photo}>
|
|
|
+ {checkFile(i, 'image') ? (
|
|
|
+ <Image
|
|
|
+ src={i + '@base@tag=imgScale&w=120'}
|
|
|
+ fit="cover"
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ <div class={styles.videoSmallWErap}>
|
|
|
+ <Image
|
|
|
+ src={palyBtn}
|
|
|
+ class={styles.playBtn}></Image>
|
|
|
+ <video
|
|
|
+ style={{ backgroundColor: '#F8F8F8' }}
|
|
|
+ poster={iconVideoDefault}
|
|
|
+ src={i + '#t=1,4'}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+
|
|
|
+ {props.item.attachmentUrl.length > 4 &&
|
|
|
+ index === 3 ? (
|
|
|
+ <div class={styles.photoMore}>
|
|
|
+ +{props.item.attachmentUrl.length - 4}
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ </SwiperSlide>
|
|
|
+ )
|
|
|
+ )}
|
|
|
+ </Swiper>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ ) : null}
|
|
|
</>
|
|
|
);
|
|
|
}
|