wxs语法中可以使用wx对象吗?比如wx.getStorage()

小程序 文章 2020-08-10 18:01 878 0 全屏看文

AI助手支持GPT4.0

wxs语法中可以使用wx对象吗?比如wx.getStorage()Can wx objects be used in wxs syntax? Such as wx.getStorage()

wxs语法中可以使用wx对象吗?比如wx.getStorage()
框架类型 问题类型 终端类型 微信版本 基础库版本
小程序 Bug 工具 6.5.3 2.0.0
     "tools">     var goTop =    function () {     // 一键回到顶部    console.log(   212)       if (wx.pageScrollTo) {      wx.pageScrollTo({        scrollTop:    0      })    }    else {      wx.showModal({        title:    '提示',        content:    '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'      })    }  }  module.exports = {       //回到顶部    goTop: goTop  }  


Framework type problem type terminal type wechat version basic library version applet bug tool 6.5.3 2.0.0 "tools" > var GoTop = function() {/ / one click to return to the top console.log (212) if ( wx.pageScrollTo ) { wx.pageScrollTo ({ scrollTop: 0 }) } else { wx.showModal ({Title: 'prompt', Content: 'the current wechat version is too low to use this function. Please upgrade to the latest wechat version and try again. ' }) } } module.exports ={/ / back to top GoTop: GoTop}

回答:

卢霄霄:

wxs里可以调用页面js的方法,简单的用法可以有,复杂的话就比较麻烦了

ㅤ国民校草ㅤ:

不能 限制多了 只能简单用用

Distance:

不能!

-y😪:

不可以的

-EOF-

AI助手支持GPT4.0