pages配置项给每个页面设置navigationBarTitleText不生效?
发布于 6 年前 作者 mingzhou 8994 次浏览 来自 问答

请问大佬,我这个backgroundColor生效了,为啥navigationBarTitleText没有生效?

```js

pages: {

        home: {

            navigationBarTitleText: ‘学校介绍’,

            backgroundColor: ‘yellow’,

        },

        list: {

            navigationBarTitleText: ‘国际学校排名’,

            backgroundColor: ‘pink’,

        }

    },

```

dist\mp下的config.js也构建了对应的

```js

“pages”: {

	"home": {

		"rem": true,

		"share": true,

		"windowScroll": false,

		"backgroundColor": "yellow",

		"navigationBarTitleText": "学校介绍"

	},

	"list": {

		"rem": true,

		"share": true,

		"windowScroll": false,

		"backgroundColor": "pink",

		"navigationBarTitleText": "国际学校排名"

	}

}

```

2 回复

我是在这里配的

参考大佬回复:https://github.com/Tencent/kbone/issues/155#issuecomment-610167997

这里单独拿出来其实是这里会存在和原生小程序配置不同的字段,为避免冲突,所以补了个 extraConfig(其实原先一开始设计是想完全接管小程序配置的,后来发现没必要,就变成现在这种方式)。

回到顶部