codecamp

Weex 使用 Weex 模块

Rax 提供了多端兼容的 API universal-api。 但在某些特殊场景下,如果向自己引用原生模块的方法,可以按照如下方式使用

以 Weex Dom 模块为例

let dom = require('@weex-module/dom');
dom.scrollToElement(someNode, {
  offset: 20,
});

let dom = __weex_require__('@weex-module/dom');
dom.scrollToElement(someNode, {
  offset: 20,
});


Weex 使用组件
Weex 页面降级
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定