123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- Component({
- options: {
- multipleSlots: true // 在组件定义时的选项中启用多 slot 支持
- },
- /**
- * 组件的属性列表
- */
- properties: {
- myData: Array,
- autoplay: {
- type: Boolean,
- value: true
- },
- interval: {
- type: Number,
- value: 4000
- },
- // 显示指示点
- indicatorDots: {
- type: Boolean,
- value: true
- },
- indicatorColor: {
- type: String,
- value: '#00000055'
- },
- indicatorActiveColor: {
- type: String,
- value: '#000000'
- },
- //衔接滑动
- circular: {
- type: Boolean,
- value: true
- },
- previousMargin: {
- type: String,
- value: '100rpx'
- },
- nextMargin: {
- type: String,
- value: '100rpx'
- },
- // 两侧图片缩放比例
- scale: {
- type: Number,
- value: 0.8
- },
- radius: {
- type: String,
- value: '10rpx'
- },
- // 两侧图片高度
- heightCommon: {
- type: String,
- value: '100%'
- },
- heightActive: {
- type: String,
- value: '100%'
- },
- // 图片间隔,默认用scale缩放,间隔为0
- padding: {
- type: String,
- value: '0rpx'
- },
- shadow: {
- type: Boolean,
- value: false
- },
- showTitle: {
- type: Boolean,
- value: false
- },
- titleStyle: {
- type: String,
- value: ''
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- currentIndex: 0
- },
- /**
- * 组件的方法列表
- */
- methods: {
- swiperChange(e) {
- this.setData({
- currentIndex: e.detail.current
- });
- },
- gotoPic(e){
- console.log(e.currentTarget.dataset.url);
- wx.navigateTo({
- url:'/pages/web/web?url='+e.currentTarget.dataset.url
- })
- }
- }
- })
|