From 65abb12b0b65367d97dcfcc07e669212725b3c08 Mon Sep 17 00:00:00 2001 From: qiang Date: Wed, 25 Sep 2019 20:49:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AEiOS=20webviewStyle=20?= =?UTF-8?q?uni-app=20=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/platforms/app-plus/index.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js index f6c90df656..8bb1063244 100644 --- a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js +++ b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js @@ -333,8 +333,11 @@ module.exports = function (pagesJson, userManifestJson) { } manifestJson.plus.useragent.value = 'uni-app' manifestJson.launch_path = '__uniappview.html' - manifestJson.plus.launchwebview.id = '1' - manifestJson.plus.launchwebview.kernel = 'WKWebview' + Object.assign(manifestJson.plus.launchwebview, { + id: '1', + kernel: 'WKWebview', + 'uni-app': 'auto' + }) if (process.env.UNI_USING_NATIVE) { appJson.entryPagePath = appJson.nvue.entryPagePath // networkTimeout @@ -354,7 +357,6 @@ module.exports = function (pagesJson, userManifestJson) { delete manifestJson.plus.launchwebview.kernel manifestJson.launch_path = '' Object.assign(manifestJson.plus.launchwebview, { - id: '1', uniNView: { path: appJson.pages[0] } @@ -369,8 +371,6 @@ module.exports = function (pagesJson, userManifestJson) { tabBar.child = ['lauchwebview'] tabBar.selected = tabBar.list.indexOf(item) } - } else { // 纯 nvue 不带 tab - } } else if (pagesJson.tabBar && pagesJson.tabBar.list && pagesJson.tabBar.list.length) { const tabBar = manifestJson.plus.tabBar = Object.assign({}, pagesJson.tabBar) @@ -385,8 +385,6 @@ module.exports = function (pagesJson, userManifestJson) { tabBar.selected = tabBar.list.indexOf(item) } } - } else { // 无 tabbar 的页面,launchWebview 的 id 为1 - } } -- GitLab