|
div组件swipe事件本地预览正常,真机上无效,没有触发- <div class="swiper-list">
- <loader if="{{loader}}"></loader>
- <div else class="swiper-list-item" @swipe="swiper">
- <div class="multi-item" onclick="detail(item.id)" for="item in threemeals[curr]">
- <image class="multi-image" src="{{item.imageUrl}}" alt="../../../../Common/images/img-alt.jpg"></image>
- <text if="{{item.isVideo}}" class="iconfont icon-video"></text>
- <div class="multi-description">
- <text class="multi-title">{{item.title}}</text>
- </div>
- </div>
- </div>
- </div>
复制代码 脚本:
- swiper(evt) {
- let curr = 0;
- evt.direction === "right"
- ? (curr = this.curr - 1, curr === -1 && (curr = 4))
- : evt.direction === "left" && (curr = this.curr + 1, curr === 5 && (curr = 0));
- this.curr = curr;
- this.loader = true;
- this.threeMealsFeatured();
- }
复制代码
|
|