提交 65abb12b 编写于 作者: Q qiang

feat: 设置iOS webviewStyle uni-app 默认值

上级 7eb0355e
...@@ -333,8 +333,11 @@ module.exports = function (pagesJson, userManifestJson) { ...@@ -333,8 +333,11 @@ module.exports = function (pagesJson, userManifestJson) {
} }
manifestJson.plus.useragent.value = 'uni-app' manifestJson.plus.useragent.value = 'uni-app'
manifestJson.launch_path = '__uniappview.html' manifestJson.launch_path = '__uniappview.html'
manifestJson.plus.launchwebview.id = '1' Object.assign(manifestJson.plus.launchwebview, {
manifestJson.plus.launchwebview.kernel = 'WKWebview' id: '1',
kernel: 'WKWebview',
'uni-app': 'auto'
})
if (process.env.UNI_USING_NATIVE) { if (process.env.UNI_USING_NATIVE) {
appJson.entryPagePath = appJson.nvue.entryPagePath appJson.entryPagePath = appJson.nvue.entryPagePath
// networkTimeout // networkTimeout
...@@ -354,7 +357,6 @@ module.exports = function (pagesJson, userManifestJson) { ...@@ -354,7 +357,6 @@ module.exports = function (pagesJson, userManifestJson) {
delete manifestJson.plus.launchwebview.kernel delete manifestJson.plus.launchwebview.kernel
manifestJson.launch_path = '' manifestJson.launch_path = ''
Object.assign(manifestJson.plus.launchwebview, { Object.assign(manifestJson.plus.launchwebview, {
id: '1',
uniNView: { uniNView: {
path: appJson.pages[0] path: appJson.pages[0]
} }
...@@ -369,8 +371,6 @@ module.exports = function (pagesJson, userManifestJson) { ...@@ -369,8 +371,6 @@ module.exports = function (pagesJson, userManifestJson) {
tabBar.child = ['lauchwebview'] tabBar.child = ['lauchwebview']
tabBar.selected = tabBar.list.indexOf(item) tabBar.selected = tabBar.list.indexOf(item)
} }
} else { // 纯 nvue 不带 tab
} }
} else if (pagesJson.tabBar && pagesJson.tabBar.list && pagesJson.tabBar.list.length) { } else if (pagesJson.tabBar && pagesJson.tabBar.list && pagesJson.tabBar.list.length) {
const tabBar = manifestJson.plus.tabBar = Object.assign({}, pagesJson.tabBar) const tabBar = manifestJson.plus.tabBar = Object.assign({}, pagesJson.tabBar)
...@@ -385,8 +385,6 @@ module.exports = function (pagesJson, userManifestJson) { ...@@ -385,8 +385,6 @@ module.exports = function (pagesJson, userManifestJson) {
tabBar.selected = tabBar.list.indexOf(item) tabBar.selected = tabBar.list.indexOf(item)
} }
} }
} else { // 无 tabbar 的页面,launchWebview 的 id 为1
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册