From 8debc653809389a1f128804d8b2acfa6bd4d17c4 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Sun, 11 Sep 2022 15:26:09 +0800 Subject: [PATCH] fix(mp-baidu): uni.createIntersectionObserver observeAll transform selectAll #3835 --- packages/uni-mp-baidu/src/api/shims.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/uni-mp-baidu/src/api/shims.ts b/packages/uni-mp-baidu/src/api/shims.ts index 4606f18f7..e49f52e0b 100644 --- a/packages/uni-mp-baidu/src/api/shims.ts +++ b/packages/uni-mp-baidu/src/api/shims.ts @@ -27,3 +27,13 @@ export function requestPayment(params: UniApp.RequestPaymentOptions) { swan.requestPolymerPayment(params) } } +export function createIntersectionObserver( + component: any, + options: UniApp.CreateIntersectionObserverOptions +) { + if (options && options.observeAll) { + ;(options as any).selectAll = options.observeAll + delete options.observeAll + } + return (swan as any).createIntersectionObserver(component, options) +} \ No newline at end of file -- GitLab