chore: move utils

This commit is contained in:
chenjiahan
2020-07-05 08:32:49 +08:00
parent 0a4c6676ba
commit 12faaa2179
20 changed files with 776 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
/**
* Hack for iOS12 page scroll
* https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800
*/
import { isIOS as checkIsIOS } from '../validate/system';
import { getRootScrollTop, setRootScrollTop } from './scroll';
const isIOS = checkIsIOS();
/* istanbul ignore next */
export function resetScroll() {
if (isIOS) {
setRootScrollTop(getRootScrollTop());
}
}