uni-app
uni-app copied to clipboard
fix(uni-mp-compiler): wxs方法支持变量作为参数
fixed: https://github.com/dcloudio/uni-app/issues/4633
感谢提供 PR,已在 review
这个修复有点问题,不能正确处理多参数以及嵌套参数的场景,比如下面的示例
<template>
<text class="title">reacitve object: {{ wxs.formatInfo(user, wxs.formatInfo(user)) }}</text>
</template>
<script module="wxs" lang="wxs">
var formatInfo = function (info, b) {
if(!info) {
return 'dsds'
}
return '我是 ' + info.name + ", 今年 " + info.age
}
module.exports = {
formatInfo: formatInfo
}
</script>
<script>
export default {
data() {
return {
user: {
name: 'Test4',
age: '18'
}
}
}
}
</script>