当前位置:   article > 正文

如何安装鸿蒙Harmony 低版API 9 三方库_property 'isatend' does not exist on type 'scrolle

property 'isatend' does not exist on type 'scroller'.

比如我要用下拉刷新三方库pulltorefresh
安装命令如下

ohpm install @ohos/pulltorefresh 
  • 1

安装完后然后运行Demo报错,说没有isAtEnd方法

oh_modules/@ohos/pulltorefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets:287:165
 Property 'isAtEnd' does not exist on type 'Scroller'.
  • 1
  • 2

在这里插入图片描述
然后查看pulltorefresh 最新版2.0.4对应OpenHarmony API10,然而我的手机是Harmony API 9,不是开发版OpenHarmony,所以必须找到API 9的库,然后查看2.0.1是还是API9
在这里插入图片描述
所以执行如下,

ohpm install @ohos/pulltorefresh@2.0.1
  • 1

执行前
在这里插入图片描述
执行后发现无需卸载新版,直接覆盖,运行项目没问题了在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/274158
推荐阅读
相关标签
  

闽ICP备14008679号