34 lines
899 B
Markdown
34 lines
899 B
Markdown
|
第一步:引入组件
|
|||
|
|
|||
|
import swiperPu from '@/components/swipers/swiper-pu.vue';
|
|||
|
|
|||
|
第二步:注册组件
|
|||
|
|
|||
|
export default {
|
|||
|
components:{
|
|||
|
'custom-swiper':swiperPu
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
第三步:使用组件
|
|||
|
|
|||
|
<template>
|
|||
|
<view>
|
|||
|
<custom-swiper></custom-swiper>
|
|||
|
</view>
|
|||
|
</template>
|
|||
|
|
|||
|
参数说明
|
|||
|
|
|||
|
isplay:是否自动轮播,默认不轮播
|
|||
|
isDot:是否显示指示点,默认显示
|
|||
|
bannerList:默认轮播图片,默认值为以下数组:
|
|||
|
[
|
|||
|
{imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',url:'',isVideo:false,poster:''},
|
|||
|
{imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',url:'',isVideo:false,poster:''},
|
|||
|
{imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',url:'',isVideo:false,poster:''},
|
|||
|
]
|
|||
|
newHeight:swiper的高,默认200px
|
|||
|
newBottom:指示点距离底部位置,默认18px
|
|||
|
newRadius:图片圆角,默认0px
|
|||
|
browseP:是否可预览,默认不能预览
|