> 文档中心 > 轻量级智能穿戴开发:JS表冠滑动问题

轻量级智能穿戴开发:JS表冠滑动问题

华为Gt3这款表上,支持通过表冠来进行滚动的操作,而在GT2系列还不支持

想要通过js来实现表冠滑动的功能,需要加上如下代码

onShow() {    if (this.$ref.ref名称.rotation) { this.$ref.ref名称.rotation();    }},onHide() {    if (this.$ref.ref名称.rotation) { this.$ref.ref名称.rotation({"focus":false});    }}对应的hml代码里面对应的容器,如list,slide等滑动组件需要定义 ref