小程序踩坑之showModal:fail parameter error

console提示:showModal:fail parameter error: parameter.content should be String instead of Undefined;
缘由是小程序

Page({
  data: {
    userInfo: {},
    hasUserInfo: false,
    dataList:{},
    currentTab: 0
  },

data.currentTab对象中的值应该为字符串"0"
正确的赋值打开方式应该是:this

this.setData({
    currentTab: current +""
})

不得不说小程序中的坑真TM多,赋值类型还得是字符串...code

相关文章
相关标签/搜索