当前位置:网站首页>Wiper component encapsulation
Wiper component encapsulation
2022-04-23 16:59:00 【Endless cake】
swiper Components
<!-- Component calls -->
<ui-swipe :product-image="swiperList" :img-event="showImageViewer" key-name="imageUrl"></ui-swipe>
<!-- Component content -->
<template>
<div class="swipe" @click="imgEvent" style="visibility: 'visible' !important">
<div class="swipe-wrap">
<div class="swiper-container">
<div class="swiper-wrapper">
<figure class="swiper-slide" v-for="(pic, picIndex) in productImage" :key="picIndex" >
<template v-if="pic.linkUrl">
<a :href="pic.linkUrl || 'javascript:void(0)'">
<img
class="h100per"
alt="pic"
:src="pic[keyName]?pic[keyName]:defaultPic"
style="visibility: 'visible' !important"
/>
</a>
</template>
<template v-if="!pic.linkUrl">
<img
class="h100per"
alt="pic"
:src="pic[keyName]?pic[keyName]:defaultPic"
style="visibility: 'visible' !important"
/>
</template>
</figure>
</div>
<div class="swiper-pagination swiper-pagination-red"></div>
</div>
</div>
<slot></slot>
</div>
</template>
<script>
export default {
props: ['productImage', 'imgEvent', 'keyName', 'defaultPic'],
mounted() {
var that = this
Vue.nextTick(function() {
setTimeout(() => {
// eslint-disable-next-line no-undef
new Swiper('.swiper-container', {
autoplay: {
// Auto play
delay: 3000, // 3s
stopOnLast: false, // The last frame plays automatically
disableOnInteraction: false // It can also play normally after manual sliding
},
loop: that.productImage.length > 1, // Roll back
pagination: {
// Configure small points
el: '.swiper-pagination',
clickable: true
}
})
}, 200)
})
},
methods: {}
}
</script>
版权声明
本文为[Endless cake]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230554520020.html
边栏推荐
- Detailed explanation of Milvus 2.0 quality assurance system
- Tencent resolves the address according to the IP address
- Multithreaded @ async thread pool
- Shell脚本——Shell编程规范及变量
- Paging the list collection
- Calculation formula related to tolerance analysis
- feign报400处理
- Deeply understand the relevant knowledge of 3D model (modeling, material mapping, UV, normal), and the difference between displacement mapping, bump mapping and normal mapping
- SQL database
- Bytevcharts visual chart library, I have everything you want
猜你喜欢
计组 | 【七 输入/输出系统】知识点与例题
Installation and management procedures
Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears
Do you really understand the principle of code scanning login?
博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
Dlib of face recognition framework
Derivation of Σ GL perspective projection matrix
oracle 中快速获取表的列名列表
How much do you know about the process of the interview
VLAN高级技术,VLAN聚合,超级Super VLAN ,Sub VLAN
随机推荐
文件操作《二》(5000字总结篇)
STM32__ 03 - beginner timer
聊一聊浏览器缓存控制
STM32__03—初识定时器
Milvus 2.0 质量保障系统详解
∑GL-透视投影矩阵的推导
Calculate pie chart percentage
VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN
Talk about browser cache control
Expression "func" tSource, object "to expression" func "tSource, object" []
Nodejs installation and environment configuration
织梦DEDECMS安全设置指南
◰ GL shader handler encapsulation
PostgreSQL列存与行存
Go language, array, string, slice
◰GL-着色器处理程序封装
昆腾全双工数字无线收发芯片KT1605/KT1606/KT1607/KT1608适用对讲机方案
_ Mold_ Board_
Your brain expands and shrinks over time — these charts show how
Deeply understand the relevant knowledge of 3D model (modeling, material mapping, UV, normal), and the difference between displacement mapping, bump mapping and normal mapping