去除打印
This commit is contained in:
@@ -108,14 +108,12 @@ Component({
|
||||
},
|
||||
// onScroll(e) {
|
||||
// // 实时更新当前滚动位置,可用于更复杂的边界判断
|
||||
// console.log("e", e)
|
||||
// this.setData({
|
||||
// scrollLeft: e.detail.scrollLeft
|
||||
// });
|
||||
// },
|
||||
|
||||
handleScrollLeft() {
|
||||
console.log("left--------------")
|
||||
// 向左滚动:减少 scrollLeft,但不能小于0
|
||||
const newScrollLeft = Math.max(0, this.data.scrollLeft - 200);
|
||||
this.setData({
|
||||
@@ -124,7 +122,6 @@ Component({
|
||||
},
|
||||
|
||||
handleScrollRight() {
|
||||
console.log("right-----------------")
|
||||
// 向右滚动:增加 scrollLeft,但不能超过 maxScrollLeft
|
||||
const newScrollLeft = Math.min(this.data.maxScrollLeft, this.data.scrollLeft + 200);
|
||||
this.setData({
|
||||
|
Reference in New Issue
Block a user