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

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

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