提交 7edf7fb9 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

fix(app): 修复nvue首页navigationBarTextStyle设置无效问题 (question/150485)

上级 77b2fa5b
const fs = require('fs') const fs = require('fs')
function generatePageCode (pages, pageOptions) { function generatePageCode (pages, pageOptions) {
return pages.map(page => { return pages.map(pagePath => {
const pagePath = page.path
if (pageOptions[pagePath].nvue) { if (pageOptions[pagePath].nvue) {
return '' return ''
} }
......
...@@ -135,8 +135,8 @@ module.exports = function (pagesJson, userManifestJson, isAppView) { ...@@ -135,8 +135,8 @@ module.exports = function (pagesJson, userManifestJson, isAppView) {
parseTheme(appJson.window) parseTheme(appJson.window)
const navigationBarTextStyle = const navigationBarTextStyle =
(appJson.pages[0].style && appJson.pages[0].style.navigationBarTextStyle) || (pagesJson.pages[0].style && pagesJson.pages[0].style.navigationBarTextStyle) ||
(appJson.window && appJson.window.navigationBarTextStyle) || (pagesJson.globalStyle && pagesJson.globalStyle.navigationBarTextStyle) ||
'white' 'white'
const navigationBarBackgroundColor = (appJson.window && appJson.window.navigationBarBackgroundColor) || '#000000' const navigationBarBackgroundColor = (appJson.window && appJson.window.navigationBarBackgroundColor) || '#000000'
...@@ -491,7 +491,7 @@ module.exports = function (pagesJson, userManifestJson, isAppView) { ...@@ -491,7 +491,7 @@ module.exports = function (pagesJson, userManifestJson, isAppView) {
appJson.compilerVersion = uniApp.compilerVersion appJson.compilerVersion = uniApp.compilerVersion
if (process.env.UNI_USING_V8) { if (process.env.UNI_USING_V8) {
let entryPagePath = appJson.pages[0].path let entryPagePath = appJson.pages[0]
let conditionPagePath = false let conditionPagePath = false
if (manifestJson.plus.arguments) { if (manifestJson.plus.arguments) {
try { try {
......
...@@ -34,17 +34,17 @@ function parseEntryPagePath (appJson, manifestJson) { ...@@ -34,17 +34,17 @@ function parseEntryPagePath (appJson, manifestJson) {
const args = JSON.parse(argsJsonStr) const args = JSON.parse(argsJsonStr)
const pathName = args.path || args.pathName const pathName = args.path || args.pathName
const entryPageQuery = (args.query ? ('?' + args.query) : '') const entryPageQuery = (args.query ? ('?' + args.query) : '')
if (pathName && appJson.pages[0].path !== pathName) { if (pathName && appJson.pages[0] !== pathName) {
appJson.entryPagePath = pathName appJson.entryPagePath = pathName
appJson.entryPageQuery = entryPageQuery appJson.entryPageQuery = entryPageQuery
if (!isTabBarPage(pathName, getTabBarPages(appJson))) { if (!isTabBarPage(pathName, getTabBarPages(appJson))) {
appJson.realEntryPagePath = appJson.pages[0].path appJson.realEntryPagePath = appJson.pages[0]
} }
} }
} catch (e) {} } catch (e) {}
} }
if (!appJson.entryPagePath) { if (!appJson.entryPagePath) {
appJson.entryPagePath = appJson.pages[0].path appJson.entryPagePath = appJson.pages[0]
} }
} }
......
...@@ -223,7 +223,7 @@ module.exports = function (pagesJson, manifestJson, project = {}) { ...@@ -223,7 +223,7 @@ module.exports = function (pagesJson, manifestJson, project = {}) {
parsePages( parsePages(
pagesJson, pagesJson,
function (page) { function (page) {
app.pages.push(page) app.pages.push(page.path)
}, },
function (root, page, subPackage) { function (root, page, subPackage) {
if (!isSupportSubPackages()) { if (!isSupportSubPackages()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册