提交 88419790 编写于 作者: Q qiang

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

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