wxml代码
<view>
<text> {{wxs.split("2019-05-14")}}</text>
</view>
<wxs module="wxs">
var split = function(data){
var test = data.split("-")
console.log(test)
}
module.exports = {
split:split
}
</wxs>
控制台输出结果

wxml代码
<view>
<text> {{wxs.split("2019-05-14")}}</text>
</view>
<wxs module="wxs">
var split = function(data){
var test = data.split("-")
console.log(test)
}
module.exports = {
split:split
}
</wxs>
控制台输出结果
本文标题:微信小程序 wxs过滤器 用 split 函数分割出的结果不是数
本文链接:https://www.haomeiwen.com/subject/jdqboqtx.html
网友评论