laixiansheng
laixiansheng
  • 发布:2020-09-30 09:30
  • 更新:2021-09-10 17:29
  • 阅读:1607

App.vue onLaunch 调用methods函数为 is not a function

分类:uni-app

第一次使用小白求助,app 启动时候调用methods函数会提示 is not a function

hx.version: 2.8.13.20200927
    onLaunch() {  
            console.log('on Launch', this.isIos())  
            plus.screen.lockOrientation('portrait-primary')  
        },  
methods: {  

            isIos() {  
                return systemInfo.platform !== 'android'  
            }  
}

控制台输出

TypeError: this.isIos is not a function
2020-09-30 09:30 负责人:无 分享
已邀请:
平安一生0708

平安一生0708

我也遇到同样的问题,请问解决了吗?

4***@qq.com

4***@qq.com

请问下你们问题解决了吗? 我现在也遇到同样的问题

w***@163.com

w***@163.com

isIos: function() {
...
}

该问题目前已经被锁定, 无法添加新回复