Closed Awen-hub closed 2 years ago
Rax Components
import { usePageShow } from "rax-app";
在组件开发功能中使用上述代码会有ts报错,rax-app没有导出usePageShow,同时微信小程序开发者工具中会报错。
-OS:win10 -node:16
{ "type": "rax", "targets": ["wechat-miniprogram"], "plugins": ["build-plugin-component", "./plugin.js"], "enablePlatformLoader": true, "outputDir": "dist" }
no
页面级别的生命周期不会直接暴露给组件,避免组件耦合页面的逻辑,如果需要的话,1. 自行通过对应容器的 API 实现;2. 页面级组件给子组件传递钩子
⌨️
Where is the bug from?
Rax Components
Minimal code and steps to reproduce the bug
Current and expected behavior
在组件开发功能中使用上述代码会有ts报错,rax-app没有导出usePageShow,同时微信小程序开发者工具中会报错。
Environment
-OS:win10 -node:16
build.json
{ "type": "rax", "targets": ["wechat-miniprogram"], "plugins": ["build-plugin-component", "./plugin.js"], "enablePlatformLoader": true, "outputDir": "dist" }
Possible solution
no
Additional context
no