修复轮播图在只有一张的时候,也轮播且无连接也跳转问题 -> https://gitee.com/beikeshop/beikeshop/issues/I61CZ4?from=project-issue
This commit is contained in:
parent
3b5917d27f
commit
bfa77f6cbd
|
|
@ -88,7 +88,7 @@ Vue.component('module-editor-slideshow', {
|
||||||
|
|
||||||
addImage() {
|
addImage() {
|
||||||
this.module.images.find(e => e.show = false);
|
this.module.images.find(e => e.show = false);
|
||||||
this.module.images.push({image: languagesFill('/demo/banner.png'), show: true, link: {type: 'product', value:''}});
|
this.module.images.push({image: languagesFill('catalog/demo/banner/banner-4-en.jpg'), show: true, link: {type: 'product', value:''}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="swiper-wrapper">
|
<div class="swiper-wrapper">
|
||||||
@foreach($content['images'] as $image)
|
@foreach($content['images'] as $image)
|
||||||
<div class="swiper-slide">
|
<div class="swiper-slide">
|
||||||
<a href="{{ $image['link']['link'] }}" class="d-flex justify-content-center"><img src="{{ $image['image'] }}" class="img-fluid"></a>
|
<a href="{{ $image['link']['link'] ?: 'javascript:void(0)' }}" class="d-flex justify-content-center"><img src="{{ $image['image'] }}" class="img-fluid"></a>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
new Swiper ('.module-swiper-{{ $module_id }}', {
|
new Swiper ('.module-swiper-{{ $module_id }}', {
|
||||||
loop: true, // 循环模式选项
|
loop: '{{ count($content['images']) > 1 ? true : false }}', // 循环模式选项
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
pauseOnMouseEnter: true,
|
pauseOnMouseEnter: true,
|
||||||
clickable :true,
|
clickable :true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue