cyndra0
cyndra0
``` javascript const intersection = (arrs) => { /** @returns { Set } intersection 两个集合的交集*/ const intersectTwoSets = (set1, set2) => { const result = new Set(set1) for (let item...
``` javascript // 边距检测 if (this.data.cut_top > this.data.info.windowHeight - this.data.height) { this.setData({ cut_top: this.data.info.windowHeight - this.data.height }); } ``` 问题就出在浮点数精度上,如果把 cut_Top(left) 和 windowHeight (width)打印出来会看到是这样的情况: `43.489 43.488999999999976`, 因而导致 touchmove ==> setData...
We can get the layout infomation of pseudo elements via `window.getComputedStyle`, and it's widely supported by browsers (https://caniuse.com/?search=getComputedStyle%3A%20Pseudo-element%20support).