The applet sets different top navigation bar names and the applet navigation bar
I. background
First, we know that there is a window attribute in app. json, which specifies the global display of the top navigation bar:
"Window": {"backgroundTextStyle": "light", "navigationBarBackgroundColor": "# fff", "navigationBarTitleText": "Haha", "navigationBarTextStyle": "black "},
But there is a problem here, that is, we have multiple pages. The top line of each page should be different. Therefore, it is incorrect to simply set app. json.
2. Set navigation text for different pages
In the applet documentation, we know that if you need to set special configurations for each page separately, you need to create a new one under the corresponding directory of each page. json file. When the program loads the file, it will automatically find the json file.
1. For example, the device directory indicates that the device creates a device. json file.
2. Note: only window-related configuration items can be set in. json of the page to determine the window performance of the page. Therefore, you do not need to write the window key, for example:
{"BackgroundTextStyle": "light", "navigationBarBackgroundColor": "# fff", "navigationBarTitleText": "device", "navigationBarTextStyle": "black "}
Here, we do not need to write the word window like app. json.
Result:
In this way, we can add different navigation topic names to each page, that is, the. json file of the new file.