Use for-of instead of forEach (#3583)
Co-authored-by: syuilo <syuilotan@yahoo.co.jp> Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
parent
30c53e9ee0
commit
125849673a
84 changed files with 345 additions and 283 deletions
|
@ -114,11 +114,11 @@ export default Vue.extend({
|
|||
},
|
||||
|
||||
onScroll(e) {
|
||||
const section = this.categories.forEach(x => {
|
||||
for (const x of this.categories) {
|
||||
const top = e.target.scrollTop;
|
||||
const el = this.$refs[x.ref][0];
|
||||
x.isActive = el.offsetTop <= top && el.offsetTop + el.offsetHeight > top;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
chosen(emoji) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue