var _self;
export default {
data() {
return {
wdWidth: 0,
wdHeight: 0,
udHeight: 0,
modalName: null,
listTouchStart: 0,
listTouchDirection: null,
username: '',
userpwd: '',
mandtCode: ''
}
},
onLoad(res) {
_self = this;
console.log(_self);
_self.wdWidth = uni.getSystemInfoSync().windowWidth;
_self.wdHeight = uni.getSystemInfoSync().windowHeight * 0.8;
uni.clearStorageSync();
}
}
![4***@qq.com](https://img-cdn-tc.dcloud.net.cn/account/identicon/e534322145ce27e0f93ff07823bdd822.png)
- 发布:2020-06-30 19:43
- 更新:2020-07-03 10:56
- 阅读:3982
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX类型: 正式
HBuilderX版本号: 2.7.14
手机系统: Android
手机系统版本号: Android 8.0
手机厂商: 华为
手机机型: casio
页面类型: vue
打包方式: 离线
项目创建方式: HBuilderX
操作步骤:
预期结果:
没有报错提示
没有报错提示
实际结果:
[Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See:
[Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See:
bug描述:
自定义页面全局变量时,在onload 事件中报错
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20200630/7f4cfaf9efdc566487ac3faa75b3e7bf.png)