<view>{{m2.stime(item)}}</view>//调用方法使用
<wxs module="m2">
var substrs = {
stime: function (str) {
return str.substring(0,10)
console.log(str.length-4)
}
}
module.exports = {
stime: substrs.stime//暴露接口调用
}
</wxs>
<view>{{m2.stime(item)}}</view>//调用方法使用
<wxs module="m2">
var substrs = {
stime: function (str) {
return str.substring(0,10)
console.log(str.length-4)
}
}
module.exports = {
stime: substrs.stime//暴露接口调用
}
</wxs>