@Preview HarmonyOS 鸿蒙Next预览问题
@Preview HarmonyOS 鸿蒙Next预览问题
@Consume(RefreshConstants.LOAD_MORE_STATE_TAG) @Watch('onStateCheck') state: number; 问题一 加上这个不能预览,去掉就可以,预览组件里加
@Provide也不行
Row() {
Image($r("app.media.ic_load_refresh"))
.width(18)
.height(18)
}
.clip(true)
.width(Constants.FULL_LENGTH) 问题二 ('100%')直接就可以预览,定义常量就不能预览
.height(100)
.justifyContent(FlexAlign.Center)
[@Preview](/user/Preview)({ title: "jia" })
@Component
struct FoodImageDisplayPreview {
build() {
Flex() {
LoadMoreLayout()
}
}
}
问题一、二代码删掉才能正常预览UI
更多关于@Preview HarmonyOS 鸿蒙Next预览问题的实战教程也可以访问 https://www.itying.com/category-93-b0.html
2 回复
这可能是该接口未在预览器中实现,如果想使用预览器的话,暂时注释掉未实现的接口
更多关于@Preview HarmonyOS 鸿蒙Next预览问题的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html