微信小程序的wxs脚本渲染 1.内联的wxs脚本 将data中的 小写的字母大写化 .wxml文件中 <view>{{m1.toUpper(username)}}</view> <!-- wxs的渲染 --> <wxs module="m1"> module.exports.toUpper = function(str){ return str.toUpperCase()} </wxs> 2.外联的wxs脚本 使用如下 注意点: