diff --git a/packages/uni-mp-baidu/src/api/shims.ts b/packages/uni-mp-baidu/src/api/shims.ts index 4606f18f7492e188bdd6590c0c64772a3c1db69f..e49f52e0bf016596a83623f8cd3699ad2b434992 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