feat:作业纸
This commit is contained in:
@@ -279,6 +279,19 @@ Page({
|
||||
this.setData({ heroSwiperCurrent: e.detail.current });
|
||||
},
|
||||
|
||||
/** 指示点与手势共用 swiper current,单张内容不自动轮播。 */
|
||||
onTapHeroDot(e: WechatMiniprogram.TouchEvent) {
|
||||
const index = Number(e.currentTarget.dataset.index);
|
||||
if (
|
||||
this.data.loading ||
|
||||
!Number.isInteger(index) ||
|
||||
index < 0 ||
|
||||
index >= this.data.featuredItems.length
|
||||
)
|
||||
return;
|
||||
this.setData({ heroSwiperCurrent: index });
|
||||
},
|
||||
|
||||
onTabChange(e: WechatMiniprogram.CustomEvent) {
|
||||
const id = e.detail.id as string | undefined;
|
||||
if (!id) return;
|
||||
|
||||
Reference in New Issue
Block a user