From d741531a7ff9627b681b8c6482f4fcbee0475989 Mon Sep 17 00:00:00 2001 From: qiang Date: Sat, 19 Oct 2019 15:54:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20tabBar=20borderStyl?= =?UTF-8?q?e=20=E9=A2=9C=E8=89=B2?= 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, 11 insertions(+), 1 deletion(-) 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 402f086a0..002c414d3 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 @@ -394,7 +394,17 @@ module.exports = function (pagesJson, userManifestJson) { // 带 tab if (pagesJson.tabBar && pagesJson.tabBar.list && pagesJson.tabBar.list.length) { const tabBar = manifestJson.plus.tabBar = Object.assign({}, pagesJson.tabBar) - tabBar.borderStyle = tabBar.borderStyle === 'white' ? '#ffffff' : '#c6c6c6' + const borderStyles = { + black: 'rgba(0,0,0,0.8)', + white: 'rgba(255,255,255,0.8)' + } + let borderStyle = tabBar.borderStyle + if (!borderStyle) { + borderStyle = borderStyles.black + } + if (borderStyle in borderStyles) { + tabBar.borderStyle = borderStyles[borderStyle] + } tabBar.height = `${parseFloat(tabBar.height) || TABBAR_HEIGHT}px` // 非纯 nvue 项目首页为 nvue 页面 if (!process.env.UNI_USING_NATIVE && isNVueEntryPage) { -- GitLab