wxml中不能使用函数方法,在需要使用全局变量的js文件,data里面定义个变量比如test,然后赋值this.setData({test:getApp().globalData}),
在wxml中使用test就行了
全局变量在wxml中使用

相关文章:

  • 2021-10-20
  • 2021-05-16
  • 2022-12-23
  • 2021-11-15
  • 2021-05-18
  • 2021-12-20
  • 2022-01-20
  • 2022-12-23
猜你喜欢
  • 2021-11-18
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案