1.创建方法文件夹util.wxs
function nmuXd(price){
return price
}
module.exports = {
nmuXd:nmuXd
}
2.在页面使用导入再使用
<wxs src="../../utils/util.wxs" module="methodFun" />
<view class="coloeBe">{{methodFun.nmuXd(1)}}</view>
Tags:
转载:转载说明/web/applet/118.html
很赞哦! (7)