<wxs module="toUpperCase"> module.exports.fn = function (str) { return str.toUpperCase() } </wxs> <view>{{toUpperCase.fn(msg)}}</view>
// upperCase.wxs module.exports.fn = function (str) { return str.toUpperCase() }
<wxs src="../../utils/upperCase.wxs" module="upperCase"></wxs>
<view>{{upperCase.fn(msg)}}</view>