我在 wxs 定义方法
var sprintf = function () {
let arg = arguments,
str = arg[0] || '',
i, n;
for (i = 1, n = arg.length; i < n; i++) {
str = str.replace(/%s/, arg[i]);
}
return str;
}
module.exports = {
sprintf: sprintf
}
然后引用的时候就报错了