HarmonyOS @Entry的编译警告It’s not a recommended way to export struct with @Entry decorator, which may cause ACE Engine error in component preview mode.
我的代码是这样:
@Entry
@Component
export struct DefaultWebviewPage {
routeParams?: RouteItemContext;//初始化进来的参数
startParams: Record<string, Object> = {}
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
HarmonyOS Entry组件export会有黄色警告
1163浏览 • 1回复 待解决
Tabs的具体使用方法,我这个报错The variable with @Link in component with @Preview may cause error in
751浏览 • 1回复 已解决
报错:“A page must have one and only one '@Entry' decorator with a struct.”
10854浏览 • 1回复 待解决
ACE ENGINE是否需要MMU的支持?
8002浏览 • 1回复 待解决
@Entry与@Component有什么区别?
3232浏览 • 2回复 待解决
编译报错A page configured in 'main_pages.json' must have one and only one '@Entry' decorator.
3542浏览 • 1回复 待解决
HarmonyOS 多个Entry类的Component组件或是多个普通的Component组件基类问题
1011浏览 • 1回复 待解决
在struct上面加了@entry还是收不到onPageShow的回调
2594浏览 • 1回复 待解决
HarmonyOS export struct的初始化参数
1324浏览 • 1回复 待解决
A problem occurred configuring project ':entry'. > Unable to download the HarmonyOS SDK. proxyHost s
13119浏览 • 2回复 待解决
A problem occurred configuring project ':entry'. > An error occur in configuration.
7644浏览 • 1回复 待解决
不小心把entry下面的build和preview删了,怎么生成?
2194浏览 • 1回复 待解决
HarmonyOS entry、har 同路径、同名文件编译时的合并机制
1179浏览 • 1回复 待解决
@Entry入口Component是否可以继承一个自定义的baseComponent?
1674浏览 • 1回复 待解决
HarmonyOS @Entry的组件相关问题
952浏览 • 1回复 待解决
HarmonyOS 自定义弹窗能否在 非 Component 或 Entry 修饰的文件中弹出
833浏览 • 1回复 待解决
HarmonyOS entry模块声明的问题
962浏览 • 1回复 待解决
HarmonyOS entry组件的横竖屏
664浏览 • 1回复 待解决
HarmonyOS entry的label如何在编译的时候通过product和target动态修改
931浏览 • 1回复 待解决
HarmonyOS Entry定义的页面没有触发onPageShow
967浏览 • 1回复 待解决
错误码code:9568287 error: install invalid number of entry hap.怎么处理?
1206浏览 • 1回复 待解决
HarmonyOS XCode 15.3无法编译flutter engine
875浏览 • 1回复 待解决
HarmonyOS 在entry里替换首页
1109浏览 • 1回复 待解决
HarmonyOS 使用@Entry修饰的组件如何将onBackPress事件传递给非@Entry修饰的子组件
899浏览 • 1回复 待解决
@Entry表明组件为入口页面,新版本为了防止组件预览模式下的ACE引擎错误,不推荐导出@Entry修饰的组件结构体。此处可以去掉@Entry,自定义组件是不需要@Entry修饰;如果此处需要同时使用的话,可以忽略。
自定义组件用法:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-create-custom-components-V5#自定义组件的基本用法
命名路由是类似的用法,可以参考一下:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-routing-V5#命名路由