原文:Vue报错Cannot read property 'split' of undefined

今天在项目中处理后端返回的字符串需要使用split做一个字符串转数组的处理,之前项目都运行得好好的,今天突然出问题了,然后面向百度编程了一波,如果你也是用的异步向后端发送请求,可能你的问题和我一样,继续往下看 解决方案 created 异步获取数据,不知道什么时候获取完,如果这时候去调用数据中的属性,就会报错 解决 因为在created或者mounted属性里面发起数据请求,是异步操作,数据什么 ...

2021-07-03 18:36 0 351 推荐指数:

查看详情

vue报错Cannot read property 'init' of undefined

vue项目报错Cannot read property 'init' of undefined 原因: echarts版本过高 解决: 1、查看package.json中的echarts版本: 结果为5.0 2、终端中输入: npm uninstall ...

Wed Apr 14 06:39:00 CST 2021 0 570
Uncaught TypeError: Cannot read propertysplit’ of undefined

问题 :Uncaught TypeError: Cannot read propertysplit’ of undefinedat HTMLLIElement. split()切割的问题 因为遍历ul的时候,第一次会得到一个空值,这个是通过输出遍历的对象知道的,最后我在使用split ...

Sat Apr 27 02:23:00 CST 2019 0 1095
vue 报错解决:TypeError: Cannot read property '_t' of undefined"

前端报错如下: [Vue warn]: Error in render: “TypeError: Cannot read property ‘_t’ of undefined” 是在项目中用了多语言配置,vue 跟 i18n之间的兼容问题。解决方法如下: 替换成 国际化其他配置项不变 ...

Wed Jun 26 08:01:00 CST 2019 1 17874
 
粤ICP备18138465号  © 2018-2026 CODEPRJ.COM