A分包的页面的组件使用了B分包的组件,没法用 componentPlaceholder,导致项目运行有问题

- 发布:2024-10-15 14:15
- 更新:2025-09-25 19:59
- 阅读:505
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 1.0.0
HBuilderX类型: 正式
HBuilderX版本号: 4.29
第三方开发者工具版本号: 1.0.0
基础库版本号: 1.0.0
项目创建方式: HBuilderX
操作步骤:
预期结果:
A分包的页面的组件使用了B分包的组件,没法用 componentPlaceholder,导致项目运行有问题
A分包的页面的组件使用了B分包的组件,没法用 componentPlaceholder,导致项目运行有问题
实际结果:
A分包的页面的组件使用了B分包的组件,没法用 componentPlaceholder,导致项目运行有问题
A分包的页面的组件使用了B分包的组件,没法用 componentPlaceholder,导致项目运行有问题
bug描述:

DCloud_UNI_OttoJi - 日常回复 uni-app/x 问题,如果艾特我没看到,请主动私信
提供在复现工程吧,并说明 vue 版本,这里的componentPlaceholder 是怎么使用的

目前只有 pages.json
中配置的页面支持,页面中用到的组件暂不支持,比如下面的代码
{
"pages": [
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
}
],
"subPackages": [
{
"root": "sub1",
"pages": [
{
"path": "index",
"style": {
"navigationBarTitleText": "sub1"
}
}
]
},
{
"root": "sub2",
"pages": [
{
"path": "index",
"style": {
"navigationBarTitleText": "sub2",
"componentPlaceholder": {
"test": "view"
}
}
}
]
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"easycom": {
"autoscan": true,
"custom": {
"^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue"
}
}
}
g***@163.com (作者)
就是在page.json里面定义的componentPlaceholder,类似于微信小程序的用法啊
2024-11-07 13:29