diff --git a/packages/common/utils.ts b/packages/common/utils.ts index 8904a0ec..44930791 100644 --- a/packages/common/utils.ts +++ b/packages/common/utils.ts @@ -1,9 +1,5 @@ import { isDef, isNumber, isPlainObject, isPromise } from './validator'; -import { - canIUseGroupSetData, - canIUseNextTick, - getSystemInfoSync, -} from './version'; +import { canIUseGroupSetData, canIUseNextTick } from './version'; export { isDef } from './validator'; export { getSystemInfoSync } from './version'; @@ -32,21 +28,9 @@ export function addUnit(value?: string | number): string | undefined { } export function requestAnimationFrame(cb: () => void) { - const systemInfo = getSystemInfoSync(); - - if (systemInfo.platform === 'devtools') { - return setTimeout(() => { - cb(); - }, 1000 / 30); - } - - return wx - .createSelectorQuery() - .selectViewport() - .boundingClientRect() - .exec(() => { - cb(); - }); + return setTimeout(() => { + cb(); + }, 1000 / 30); } export function pickExclude(obj: unknown, keys: string[]) { diff --git a/yarn.lock b/yarn.lock index 8b83fa09..d56dd38d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5333,9 +5333,9 @@ decimal.js@^10.2.1: integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== decompress-response@^6.0.0: version "6.0.0"