提交 809604bd 编写于 作者: fxy060608's avatar fxy060608

feat(v3): add isTab

上级 53d53ef3
...@@ -80,8 +80,8 @@ export function createWebview (path, routeOptions, query) { ...@@ -80,8 +80,8 @@ export function createWebview (path, routeOptions, query) {
webviewStyle.uniPageUrl = getUniPageUrl(path, query) webviewStyle.uniPageUrl = getUniPageUrl(path, query)
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
console.log('[uni-app] createWebview', webviewId, path, webviewStyle) console.log('[uni-app] createWebview', webviewId, path, webviewStyle)
} }
// android 需要使用 // android 需要使用
webviewStyle.isTab = !!routeOptions.meta.isTabBar webviewStyle.isTab = !!routeOptions.meta.isTabBar
return plus.webview.create('', String(webviewId), webviewStyle, { return plus.webview.create('', String(webviewId), webviewStyle, {
nvue: true nvue: true
...@@ -107,6 +107,9 @@ export function initWebview (webview, routeOptions, path, query) { ...@@ -107,6 +107,9 @@ export function initWebview (webview, routeOptions, path, query) {
if (!routeOptions.meta.isNVue) { if (!routeOptions.meta.isNVue) {
webviewStyle.debugRefresh = getDebugRefresh(path, query, routeOptions) webviewStyle.debugRefresh = getDebugRefresh(path, query, routeOptions)
} else {
// android 需要使用
webviewStyle.isTab = !!routeOptions.meta.isTabBar
} }
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
console.log('[uni-app] updateWebview', webviewStyle) console.log('[uni-app] updateWebview', webviewStyle)
...@@ -167,4 +170,4 @@ export function consumeWebviewReady (pageId) { ...@@ -167,4 +170,4 @@ export function consumeWebviewReady (pageId) {
const callbacks = webviewReadyCallbacks[pageId] const callbacks = webviewReadyCallbacks[pageId]
Array.isArray(callbacks) && callbacks.forEach(callback => callback()) Array.isArray(callbacks) && callbacks.forEach(callback => callback())
delete webviewReadyCallbacks[pageId] delete webviewReadyCallbacks[pageId]
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册