猫史档案馆


【不懂必须问】

用户:老李头13zl老李头13zl查看:2 回复:2 评论:2 创建时间:2023-07-18T20:26:43


假如我在一个模块(one.js)写了一个函数

我如何回到index.js或者其他模块使用呢


回复

上一页1 页 / 共 1下一页
SCS_user_LoeheodVOQSCS_user_LoeheodVOQ

https://shequ.codemao.cn/community/474253

点赞0


评论


囧仙_official囧仙_official

one.js里面exports.xx=xx

在index.js里 const xxx = require("./xx.js")

直接调用xxx.xx()即可

点赞0


评论