(一)WXS脚本
生命是wxs

wxs的应用场景

wxs和javaScript的关系

(二)WXS脚本
- 内嵌wxs脚本

<view>{{m1.toUpper(username)}}</view>
<wxs module="m1">
module.exports.toUpper = function(str){
return str.toUpperCase()
}
</wxs>- 定义外联的wxs脚本

- 使用外联的wxs脚本

// 再utils中新建一个toos
function toLower(str){
return str.toLowerCase()
}
module.exports = {
toLower: toLower
}(二)WXS的特点




版权声明:本文为weixin_53669566原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。