AppJson

  • 全局配置文件编译处理

使用示例

  1. useReducer({
  2. AppJson (node, store) {
  3. let json = this.$node.content;
  4. // you can process app.json here
  5. if (json.window) {
  6. json.windowInfo = json.window;
  7. delete json.window;
  8. }
  9. }
  10. });

编译结果示例

  • 编译前
  1. {
  2. "window": {
  3. "navigationBarTextStyle": "black",
  4. "navigationBarTitleText": "演示",
  5. "navigationBarBackgroundColor": "#F8F8F8",
  6. "backgroundColor": "#F8F8F8"
  7. }
  8. }
  • 编译后
  1. {
  2. "windowInfo": {
  3. "navigationBarTextStyle": "black",
  4. "backgroundColor": "#F8F8F8",
  5. "defaultTitle": "演示",
  6. "titleBarColor": "#F8F8F8"
  7. }
  8. }