提交 88419790 编写于 作者: Q qiang

Merge branch 'v3' of github.com:dcloudio/uni-app into v3

......@@ -50,7 +50,7 @@ function back (delta, animationType, animationDuration) {
})
}
const backPage = function () {
const backPage = function (webview) {
if (animationType) {
webview.close(animationType, animationDuration || ANI_DURATION)
} else {
......@@ -69,11 +69,13 @@ function back (delta, animationType, animationDuration) {
})
}
const webview = currentPage.$getAppWebview()
if (!currentPage.__uniapp_webview) {
return backPage()
return backPage(webview)
}
const webview = currentPage.$getAppWebview()
backWebview(webview, backPage)
backWebview(webview, () => {
backPage(webview)
})
}
export function navigateBack ({
......
......@@ -77,6 +77,7 @@ function _switchTab ({
query: {},
openType: 'switchTab'
}), 'none', 0, () => {
setStatusBarStyle()
invoke(callbackId, {
errMsg: 'switchTab:ok'
})
......
......@@ -30,7 +30,8 @@ function parseTitleNViewButtons (titleNView) {
export function parseTitleNView (routeOptions) {
const windowOptions = routeOptions.window
const titleNView = windowOptions.titleNView
const titleNView = windowOptions.titleNView
routeOptions.meta.statusBarStyle = windowOptions.navigationBarTextStyle === 'black' ? 'dark' : 'light'
if ( // 无头
titleNView === false ||
titleNView === 'false' ||
......@@ -68,8 +69,6 @@ export function parseTitleNView (routeOptions) {
}]
}
routeOptions.meta.statusBarStyle = windowOptions.navigationBarTextStyle === 'black' ? 'dark' : 'light'
if (isPlainObject(titleNView)) {
return Object.assign(ret, parseTitleNViewButtons(titleNView))
}
......
......@@ -34,13 +34,13 @@ const handleData = {
const [pageId, pagePath, pageOptions] = data
document.title = `${pagePath}[${pageId}]`
// 设置当前页面伪对象,方便其他地方使用 getCurrentPages 获取当前页面 id,route
setCurrentPage(pageId, pagePath)
setCurrentPage(pageId, pagePath)
// 通知页面创建,根据当前页面配置信息,初始化部分事件
UniViewJSBridge.subscribeHandler(ON_PAGE_CREATE, pageOptions, pageId)
// 初始化当前页面 VueComponent(生成页面样式代码)
PageVueComponent = getPageVueComponent(pagePath)
// 生成当前页面 vd
vd = new VDomSync(pageId)
// 通知页面创建,根据当前页面配置信息,初始化部分事件
UniViewJSBridge.subscribeHandler(ON_PAGE_CREATE, pageOptions, pageId)
},
[MOUNTED_DATA]: function onMounted (data) {
vd.addVData.apply(vd, data)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册