比如我要用下拉刷新三方库pulltorefresh
安装命令如下
ohpm install @ohos/pulltorefresh
安装完后然后运行Demo报错,说没有isAtEnd方法
oh_modules/@ohos/pulltorefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets:287:165
Property 'isAtEnd' does not exist on type 'Scroller'.
然后查看pulltorefresh 最新版2.0.4对应OpenHarmony API10,然而我的手机是Harmony API 9,不是开发版OpenHarmony,所以必须找到API 9的库,然后查看2.0.1是还是API9
所以执行如下,
ohpm install @ohos/pulltorefresh@2.0.1
执行前
执行后发现无需卸载新版,直接覆盖,运行项目没问题了