1
0
şunun yansıması https://github.com/ialley-workshop-open/uni-halo.git eşitlendi 2026-06-12 13:19:31 +08:00

修改:优化列表动画效果

Bu işleme şunda yer alıyor:
小莫唐尼
2023-06-08 21:23:21 +08:00
ebeveyn 21d723d260
işleme f838da43d8
21 değiştirilmiş dosya ile 4725 ekleme ve 4865 silme
+25 -3
Dosyayı Görüntüle
@@ -18,15 +18,31 @@ export default {
return {
author: HaloConfig.author,
_isWechat: true,
haloAdConfig: HaloAdConfig
haloAdConfig: HaloAdConfig,
_aniWaitIndex: 0, // 动画索引
};
},
computed: {
// 获取全局应用设置
globalAppSettings() {
return uni.$tm.vx.getters().getSettings;
},
// 计算动画索引
calcAniWait() {
return (index) => {
if ((index + 1) % 10 == 0) {
this._aniWaitIndex = 1;
} else {
this._aniWaitIndex += 1;
}
console.log('this._aniWaitIndex', this._aniWaitIndex);
return this._aniWaitIndex * 50
}
}
},
onLoad() {
this.fnResetSetAniWaitIndex()
},
created() {
// #ifdef MP-WEIXIN
this._isWechat = true;
@@ -36,7 +52,9 @@ export default {
this._isWechat = false;
// #endif
},
onShow() {
this.fnResetSetAniWaitIndex()
},
methods: {
/**
* 设置页面标题
@@ -60,8 +78,12 @@ export default {
console.log('err', err);
},
});
},
// 初始化动画索引值(需要在每个页面调用)
fnResetSetAniWaitIndex() {
this._aniWaitIndex = 0
}
},
});
},
};
};