This commit is contained in:
魏啾
2024-04-30 18:27:43 +08:00
parent 25acfbeb91
commit 3b85017f91
24 changed files with 2846 additions and 108 deletions

View File

@@ -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;