更新记录
1.0(2020-06-25)
1.0, 轮播图的全屏显示,以及文字说明
平台兼容性
uni-app
app-vue |
app-nvue |
app-android |
app-ios |
? |
? |
? |
? |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
? |
? |
? |
? |
? |
? |
? |
? |
? |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
? |
? |
? |
? |
? |
? |
? |
? |
? |
uni-app x
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
? |
? |
? |
? |
? |
? |
? |
? |
? |
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
其它待开发...