tükörképe a:
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-06-11 12:49:30 +08:00
修改:优化列表动画效果
This commit is contained in:
@@ -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
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user