1
This commit is contained in:
@@ -39,7 +39,11 @@
|
||||
y: 0
|
||||
},
|
||||
screenWidth: 0,
|
||||
itemStyle: []
|
||||
itemStyle: [
|
||||
{
|
||||
transform:''
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -50,16 +54,16 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
var macInfo = uni.getSystemInfoSync();
|
||||
this.screenWidth = macInfo.screenWidth;
|
||||
// 计算swiper样式
|
||||
this.swiperList.forEach((item, index) => {
|
||||
this.itemStyle.push(this.getStyle(index))
|
||||
})
|
||||
this.timersetInterval = setInterval(() => {
|
||||
this.endMove()
|
||||
}, 2000);
|
||||
// this.timersetInterval = setInterval(() => {
|
||||
// this.endMove()
|
||||
// }, 2000);
|
||||
},
|
||||
methods: {
|
||||
getStyle(e) {
|
||||
@@ -97,7 +101,6 @@
|
||||
this.slideNote.y = e.changedTouches[0] ? e.changedTouches[0].pageY : 0;
|
||||
},
|
||||
endMove(e) {
|
||||
console.log(e, 86)
|
||||
var newList = JSON.parse(JSON.stringify(this.itemStyle))
|
||||
// if ((e.changedTouches[0].pageX - this.slideNote.x) < 0) {
|
||||
// 向左滑动
|
||||
@@ -116,8 +119,7 @@
|
||||
|
||||
<style lang="scss">
|
||||
.swiperPanel {
|
||||
margin: 20rpx 0;
|
||||
height: 100rpx;
|
||||
height: 28rpx;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user