HarmonyOS 多products模式下,Pages列表配置位置

HarmonyOS 多products模式下,Pages列表配置位置。

HarmonyOS
2024-10-22 11:45:48
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
put_get

Stage模型,Pages列表配置位置如下:

{  
  "apiType": 'stageMode',  
  "buildOption": {  
  },  
  "targets": [  
    {  
      "name": "default",  
      "runtimeOS": "HarmonyOS",  
      "source": { //定义Stage模型中默认版target的pages源码文件  
        "pages": [  
          "pages/Index"  
        ]  
      }  
    },  
    {  
      "name": "free",  
      "runtimeOS": "HarmonyOS",  
      "config": {  
        "deviceType": [  
          "phone"  
        ]  
      },  
      "source": { //定义Stage模型中免费版target的pages源码文件  
        "pages": [  
          "pages/Index",  
          "pages/Page1"  
        ]  
      }  
    },  
    {  
      "name": "pay",  
      "runtimeOS": "HarmonyOS",  
      "config": {  
        "deviceType": [  
          "phone"  
        ]  
      },  
      "source": { //定义Stage模型中付费版target的pages源码文件  
        "pages": [  
          "pages/Index",  
          "pages/Page2"  
        ]  
      }  
    }  
  ]  
}

FA模型,Pages配置位置如下:

{  
  "apiType": 'faMode',  
  "buildOption": {  
  },  
  "targets": [  
    {  
      "name": "default",  
      "runtimeOS": "HarmonyOS",  
      "source": { //定义FA模型中默认版target的pages源码文件  
        "abilities": [  
          {  
            "name": ".MainAbility",  
            "pages": [  
              "pages/index"  
            ]  
          }  
        ],  
      }  
    },  
    {  
      "name": "free",  
      "runtimeOS": "HarmonyOS",  
      "config": {  
        "deviceType": [  
          "phone"  
        ]  
      },  
      "source": { //定义FA模型中免费版target的pages源码文件  
        "abilities": [  
          {  
            "name": ".MainAbility",  
            "pages": [  
              "pages/index",  
              "pages/page1"  
            ]  
          }  
        ],  
      }  
    },  
    {  
      "name": "pay",  
      "runtimeOS": "HarmonyOS",  
      "config": {  
        "deviceType": [  
          "phone"  
        ]  
      },  
      "source": { //定义FA模型中付费版target的pages源码文件  
        "abilities": [  
          {  
            "name": ".MainAbility",  
            "pages": [  
              "pages/index",  
              "pages/page2"  
            ]  
          }  
        ],  
      }  
    }  
  ]  
}
分享
微博
QQ
微信
回复
2024-10-22 17:29:27
相关问题
stage模式,module.json5的配置
303浏览 • 1回复 待解决
模块签名配置DevEcoStudio报错
7688浏览 • 2回复 待解决
HarmonyOS List列表滚动到指定位置
27浏览 • 1回复 待解决
PolarDB在云用的吗?
3590浏览 • 1回复 待解决