taro启用组件按需注入
钢翼
编程
在 app.config.ts中添加 lazyCodeLoading: "requiredComponents",
如下
export default defineAppConfig({
lazyCodeLoading: "requiredComponents",
pages: [
"pages/login/index",
"pages/index/index"
],
window: {
backgroundTextStyle: "light",
navigationBarBackgroundColor: "#fff",
navigationBarTitleText: "WeChat",
navigationBarTextStyle: "black"
}
})