Skip to content

Commit

Permalink
Merge branch 'fix-actionsheet-1217' into fix-drn
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcuijuan committed Dec 23, 2024
2 parents 1e3884b + ca907fe commit 0bddabe
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const _WebView = forwardRef<HandlerRef<WebView, WebViewProps>, WebViewProps>((pr
}
});
}
true;
`
const _changeUrl = function (navState: WebViewNavigation) {
if (navState.navigationType) { // navigationType这个事件在页面开始加载时和页面加载完成时都会被触发所以判断这个避免其他无效触发执行该逻辑
Expand Down Expand Up @@ -211,16 +212,15 @@ const _WebView = forwardRef<HandlerRef<WebView, WebViewProps>, WebViewProps>((pr
onError: _error
})
}
extendObject(events, {
onMessage: _message
})

return createElement(Portal, null, createElement(WebView, extendObject({
style: defaultWebViewStyle,
source: { uri: src },
ref: webViewRef,
javaScriptEnabled: true,
onNavigationStateChange: _changeUrl
onNavigationStateChange: _changeUrl,
onMessage: _message,
injectedJavaScript: injectedJavaScript
}, events)))
})

Expand Down

0 comments on commit 0bddabe

Please sign in to comment.