www.cftea.com

微信小程序 JS 中引用其他 JS 文件的方法

ITPOW2019/6/14 17:54:02

假如 a.js 中想引用 b.js 中的方法,怎么做呢?

首先、b.js

其中 module.exports 表示要对外暴露的方法。

然后、a.js

使用 require 引入,然后再调用。

<<返回首页<<