0
点赞
收藏
分享

微信扫一扫

data.name.toLowerCase() is not a function问题


文章目录

  • ​​1. 现象​​
  • ​​2. 分析​​
  • ​​3. 解决方案​​
1. 现象

Error in v-on handler: "TypeError: suffixs[i].toLowerCase is not a function"

data.name.toLowerCase() is not a function问题_解决方案

2. 分析

主要原因是.toLowerCase()方法需要前面是字符串类型

3. 解决方案
  • 案例:

(data.name +='') .toLowerCase()

  • 源码
  • data.name.toLowerCase() is not a function问题_字符串_02

  • 修改后

data.name.toLowerCase() is not a function问题_开发语言_03

data.name.toLowerCase() is not a function问题_开发语言_04


举报

相关推荐

0 条评论