- 分包改动后,同为跨子包,但是导致组件加载异步问题?
问题:跨子包引用组件在onReady下获取不到,独立分包可以,合并分包异常。 有个页面a,也是独立子包。写法 { "root": "pages/shopmall", "pages": [ "index" ] }, 这个页面的json文件用了下下面目录下的组件: { "component": true, "placeholder": "view", "usingComponents": { "point-product-detail": "/pages/member/member-point/components/point-product-detail/index" } } 并且js的onReady生命周期获取这个组件为: ready() { this.$pointComponentsPointProductDetail = this.getComponentById('pointComponentsPointProductDetail'); } 代码变更: [图片] 合并多个独立子包后。按理来说对于shopMall页面应用的组件,依旧是跨子包引用,但是onready生命周期内的代码就获取不到了。这块在子包内仅一个页面和多个页面有不同差异化处理吗?
2025-08-07 - 子包内没有占位组件,导致页面中断渲染并抛出错误,基础库版本升级导致的吗?
https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/placeholder.html ready() { this.$pointComponentsPointProductDetail = this.getComponentById('pointComponentsPointProductDetail');}, <point-product-detail id="pointComponentsPointProductDetail" > </point-product-detail> 没用占位组件的时候,“基础库会中断渲染并抛出错误”,这个为什么会中断渲染,之前的版本即使报错都是正常渲染的。在哪个版本啥时候升级后,就中断渲染了,导致业务升级小程序后就用不了了
2025-08-05 - 小程序与web-view内嵌H5相互通信?
小程序如何给web-view内的h5页面发送消息
2023-09-22