1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- 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
- });
- }
- }
- })
|