提交 addaa7b6 编写于 作者: D DCloud_LXH

chore: preloadPage fromatLog

上级 fbe529f3
...@@ -46,17 +46,22 @@ export function registerPage({ ...@@ -46,17 +46,22 @@ export function registerPage({
if (_webview.__page__) { if (_webview.__page__) {
// 该预载页面已处于显示状态,不再使用该预加载页面,直接新开 // 该预载页面已处于显示状态,不再使用该预加载页面,直接新开
if (getCurrentPages().find((page) => page === _webview.__page__)) { if (getCurrentPages().find((page) => page === _webview.__page__)) {
if (process.env.NODE_ENV !== 'production') { if (__DEV__) {
console.log( console.log(
`[uni-app] preloadWebview(${path},${_webview.id}) already in use` formatLog(
'uni-app',
`preloadWebview(${path},${_webview.id}) already in use`
)
) )
} }
webview = undefined webview = undefined
} else { } else {
// TODO eventChannel // TODO eventChannel
addCurrentPage(_webview.__page__) addCurrentPage(_webview.__page__)
if (process.env.NODE_ENV !== 'production') { if (__DEV__) {
console.log(`[uni-app] reuse preloadWebview(${path},${_webview.id})`) console.log(
formatLog('uni-app', `reuse preloadWebview(${path},${_webview.id})`)
)
} }
return _webview return _webview
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册