更新记录

1.0(2020-06-25)

1.0, 轮播图的全屏显示,以及文字说明


平台兼容性

swiper image for uniApp


使用说明

拷贝该组件到components目录下之后
script 中引用组件

import swiperImg from '@/components/swiper/swiper.vue'
export default {
    components:{
        swiperImg
    },

在 template 中使用组件:

<swiperImg :swiperList="swiperList"
         :indicatorDots="true" 
         :autoplay="true" 
         :interval="2000" 
         :duration="500" 
         />

组件参数说明

属性名 类型 默认值 说明
swiperList Array<Object> [] 初始化的图片数据,放入图片地址
indicatorDots Boolean true 是否显示原点,同组件中的swiper
autoplay Boolean true 是否自动播放, 同组件swiper属性
interval Number 2000 自动切换时间间隔,同组件swiper
duration Number 500 持续时间, 同组件swiper

自定义事件说明

事件名称 说明 返回参数

demo示例

<template>
    <view>
        <swiperImg :swiperList="swiperList"
         :indicatorDots="true" 
         :autoplay="true" 
         :interval="2000" 
         :duration="500" 
         />
    </view>
</template>

<script>
    import swiperImg from '@/components/swiper/swiper.vue'
    export default {
        components:{
            swiperImg
        },
        data() {
            return {
                swiperList:[
                   {    img:'/static/sky01.jpg',
                        title:'星空1',
                        content:'安静笼罩著夏夜巨大的星空,覆盖著整个地球,温柔地无声无息'
                   },
                   {    img:'/static/sky02.jpg',
                        title:'星空2',
                        content:'星星就像一盏盏小电灯,在空中闪烁'
                   },
                    {   img:'/static/sky03.jpg',
                        title:'星空3',
                        content: '我在星空的这一端,你在星空的那一端,相隔很远这很远。灿烂的永恒,无尽的遥远,再也无法相见..'
                   }, { img:'/static/sky04.jpg',
                        title:'星空4',
                        content: '一切都如生命一般,在悄然地发生着变化,就如这黑夜一样,失去了光明,却得到了星空.'
                   },     
                ],
            }
        },
        methods: {

        }
    }
</script>

<style>

</style>

通用配置(version)

版本号 更新时间 关键字 默认值 功能作用 类型
v0.1 2020/6/25 实现简单的图片上传预览
                                                                                                                                |

                                                                                                                |

欢迎大家下载测试,以及评论留言, 有遇到什么bug, 我会尽快处理

  • 如有什么需求需要添加,也可以多加评论,表达

License

MIT

Copyright (c) 2020-present, 2305945912@qq.com

其它待开发...

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问