遇到的bug
Void骑士
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Error: for..in loops iterate over the entire prototype chain
ESLint报错: for…in loops iterate over the entire prototype chain, which is virtually never what you want.原因for…in会遍历整个原型链,可能会出现我们不想遍历到的属性,例如class A { constructor() { this.a = 'va' }};A.prototype.todo = () => 'todo';let a = new A();for(let原创 2021-06-15 10:38:58 · 682 阅读 · 1 评论 -
echarts图表的label换行显示
echarts中labeld的文字如果过长,就会出现下图中的效果我们可以先试着通过设置文字 倾斜 来解决问题var option = { tooltip: { trigger: 'axis', }, toolbox: { feature: { dataView: {show: true, readOnly: false}, magicType: {show: true, type: ['line', 'bar']}, restore: {show: tr原创 2020-12-16 23:46:00 · 5557 阅读 · 1 评论 -
Uncaught TypeError: Property description must be an object
报错用Object.defineProperties定义属性时报错: Uncaught TypeError: Property description must be an object: m解决这里的defineProperties应该改为definePropertydefineProperty 和 defineProperties 的区别Object.defineProperty该方法会直接在一个对象上定义 一个 新属性,或者修改一个对象的现有属性该方法有 三个 参数 Object.原创 2020-08-20 12:46:54 · 4163 阅读 · 0 评论 -
return axios中的网络请求结果
今天修复一个bug,需要先通过axios获取用户数据,再根据获取到的数据是否为空,判断用户是否存在。但在这个过程里出现了一个问题。// 判断用户是否存在if(isUserExits(this.userId)) { console.log('进行操作') console.log(isUserExits(this.userID)) // --- 结果是 undefined}// isUserExits方法methods: { isUserExits(userId) { Axios原创 2020-07-07 22:14:31 · 1634 阅读 · 2 评论
分享