Tabs的具体使用方法,我这个报错The variable with @Link in component with @Preview may cause error in
这个说是组件问题,但是根本没法理解啊!
我报错的情况是:
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/pages/Main.ets:25:3
[Compile Result] The variable with @Link in component with @Preview may cause error in component preview mode
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/view/HomeView.ets:10:3
[Compile Result] The variable with @Link in component with @Preview may cause error in component preview mode
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/view/HomeView.ets:11:3
[Compile Result] The variable with @Link in component with @Preview may cause error in component preview mode
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/view/HomeView.ets:12:3
[Compile Result] The variable with @Link in component with @Preview may cause error in component preview mode
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/view/AboutView.ets:7:9
[Compile Result] The @Link property 'userInfo' cannot be an optional parameter.
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/components/NavigationComponent.ets:6:3
[Compile Result] The variable with @Consume in component with @Preview may cause error in component preview mode
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/components/TitleComponent.ets:10:3
[Compile Result] The variable with @Link in component with @Preview may cause error in component preview mode
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/components/TitleComponent.ets:11:3
[Compile Result] The variable with @Link in component with @Preview may cause error in component preview mode
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/components/TitleComponent.ets:12:9
[Compile Result] The @Link property 'userInfo' cannot be an optional parameter.
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/components/TitleComponent.ets:12:3
[Compile Result] The variable with @Link in component with @Preview may cause error in component preview mode
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/components/CommunityComponent.ets:6:34
[Compile Result] The @Link property 'userInfo' cannot be an optional parameter.
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/components/CommunityComponent.ets:6:3
[Compile Result] The variable with @Link in component with @Preview may cause error in component preview mode
[Compile Result] ArkTS:WARN File: D:/save/myclass/xulaoshi/temp/atomgit_jiarong/entry/src/main/ets/components/CommunityComponent.ets:7:3
[Compile Result] The variable with @Link in component with @Preview may cause error in component preview mode
Preview check failed. View the check result.
无法显示效果:
harmony
Tabs
赞
1
收藏 0
回答 1
已解决
相关问题
HarmonyOS @Entry的编译警告It’s not a recommended way to export struct with @Entry decorator, which may cause.....ACE Engine error in component preview mode.
2147浏览 • 1回复 待解决
RSA 加密的具体使用方法
1379浏览 • 1回复 待解决
HarmonyOS 关于AOP具体使用方法
1638浏览 • 1回复 待解决
HarmonyOS 有没有具体文档介绍vp的含义及使用方法?
1030浏览 • 1回复 待解决
touchEvent的使用方法
7984浏览 • 1回复 待解决
日志工具类的使用方法
1556浏览 • 1回复 待解决
HarmonyOS AsyncCallback的使用方法
2642浏览 • 1回复 待解决
HarmonyOS vp的含义及使用方法?
1011浏览 • 1回复 待解决
HarmonyOS 执行Flutter build hap,报错hvigor ERROR: Cause: The SDK license agreement is not accepted
2199浏览 • 1回复 待解决
'@Link' decorated 'card_text' must be initialized through the component constructor 这个如何解决?
6147浏览 • 1回复 待解决
使用BuilderParam在父组件调用this的方法报错:Error message:is not callable
2952浏览 • 1回复 待解决
HarmonyOS 在Page内使用方法调用方法异常
2016浏览 • 1回复 待解决
#鸿蒙通关秘籍#鸿蒙栅格布局容器的使用方法
975浏览 • 1回复 待解决
HarmonyOS har 模块内router 的正确使用方法
1042浏览 • 1回复 待解决
HarmonyOS NODE_ALIGN_SELF使用方法描述有误
1516浏览 • 1回复 待解决
HarmonyOS .ets文件中不能使用方法重载
996浏览 • 1回复 待解决
BackupExtensionAbility 是否有具体使用范例代码,或者具体描述一下这个的使用场景
2915浏览 • 1回复 待解决
#鸿蒙通关秘籍# 在ArkTS开发中,如何实现组件之间的数据双向绑定,@Link装饰器的作用和使用方法是什么?
1193浏览 • 1回复 待解决
HarmonyOS 有像 Vue 一样的插槽使用方法吗
906浏览 • 1回复 待解决
HarmonyOS Navigation跳转到具体Component,Component自己实现的onBackPress响应不到
711浏览 • 1回复 待解决
HarmonyOS Error: Init error. The WebviewController must be associated with a Web component
2159浏览 • 1回复 待解决
HarmonyOS @Link使用问题
984浏览 • 1回复 待解决
HarmonyOS组件嵌入flutter页面 OhosView的使用方法及HarmonyOS端实现
1353浏览 • 1回复 待解决
#鸿蒙通关秘籍#KCP协议在OpenHarmony中的接口使用方法详解
1399浏览 • 1回复 待解决
我给你一个示例,这么用就没什么问题了:
好用的话希望采纳。