首页 > 其他分享 >TypeError: Cannot read properties of undefined (reading 'trim')

TypeError: Cannot read properties of undefined (reading 'trim')

时间:2024-05-05 13:33:22浏览次数:12  
标签:trim TypeError undefined form read Cannot reading

 运行时提示:TypeError: Cannot read properties of undefined (reading 'trim')

问题排查:

1、确认trim()属性是否存在,这个是js 去除字符串左右空格,属性是存在的

2、确认this.form.proxy_url是否存在

3、确认确认this.form.proxy_url的值是否为undefined和null

通过排查和打印,console.log(this.form.proxy_url)的值为undefined

解决:

 

标签:trim,TypeError,undefined,form,read,Cannot,reading
From: https://www.cnblogs.com/xianhaiyan/p/18164347

相关文章

  • macOS OpenCV报错:Undefined symbols for architecture x86_64
    这个错误可能是链接的OpenCV库不对,我这里的情况是我代码使用的GCC编译器,但是通过brewinstallopencv安装的OpenCV是使用clang编译的,代码也使用clang编译器可以解决这个问题。要查看opencv的编译信息,可以使用这个命令opencv_version-v我这边输出Generalconfigurationfo......
  • error: possibly undefined macro: AC_CHECK_HEADERS
    Hi,Ihavebeengettingthebelowerrorafterrunning./bootstrap:autoreconf:running:/usr/bin/autoconf--force--warnings=allconfigure.ac:133:error:possiblyundefinedmacro:AC_CHECK_HEADERSIfthistokenandothersarelegitimate,pleaseusem4_pat......
  • docker.from_env() 获取docker守护进程时出现 TypeError: load_config() got an unexp
    某天使用python重启docker容器时,出现了一个令人费解的BUG,我的代码为1defrestart_docker(container_name):2#连接到docker守护进程3client=docker.from_env()4try:5#获取容器对象6container=client.containers.get(containe......
  • 修改元素样式报错:Cannot set properties of undefined (setting 'visibility')
    1、正常书写代码如下:<divclass="cl"><divid="mask"><spanid="close">X</span></div></div><!--JS代码如下--><script>letclose=document.getElement......
  • Cadence Virtuoso 打开 Layout 显示 undefined packet
    软件版本:IC617操作系统:CentOS解决办法:临时方法打开layout后。按住shift,点选左边layers窗口中的任一层次,弹出displayResourceEditor窗口。file->load。选择需要的drf文件加载即可。永久方法把display.drf文件复制到你的virtuoso启动目录即可参考链接......
  • v-model的修饰符( .number .trim .lazy)
    v-model的修饰符 .number的作用是将绑定的值从string类型变为number类型 在上述代码中,我们在input元素绑定了blur事件,作用为当鼠标移出当元素,触发该事件去响应方案 可以看到在鼠标移出后,控制台打印的number类型为string当我们再v-model后加上修饰符.number后 控制台......
  • Fedora 39 修复 libreoffice 启动时报错 undefined symbol: hb_graphite2_face_get_gr
    .....之前Libreoffice是好的,今天打开Excel文档的时候启动画面一闪而过,然后就没有然后了。于是我尝试使用命令来启动,发现报错:>$libreoffice/usr/lib64/libreoffice/program/soffice.bin:symbollookuperror:/usr/lib64/libreoffice/program/libvcllo.so:undefin......
  • TypeError: Cancel() takes 0 positional arguments but 1 was given 的一种原因
    python非静态成员函数在自定义python类中,使用pycharm作为IDE,其补全功能会自动为类内的function创建self作为函数的第一参数。一些普通的IDE或者没有专门设置的IDE不会为类内的方法添加self作为第一参数,因此需要coder们自行添加。除非是静态函数不需要self作为参数。如......
  • WPF的TextTrimming的属性
    WPF的TextTrimming="CharacterEllipsis"是一种文本修剪方式,用于在文本长度超过容器宽度时省略文本。它会在文本末尾添加省略号(...),同时保留尽可能多的字符。这种修剪方式通常用于UI设计中,以避免文本溢出并保持视觉美观。可以通过设置TextTrimming属性来指定文本的截断方式:Tex......
  • 【报错】TypeError: execute() takes from 2 to 3 positional arguments but 5 were g
    问题:cursor.execute()方法传递多个参数时,传参错误,错误传递方式如下:sql="insertintoent_portal.ent_stu_round(ord_id,ord_detail_id,round_id,status,property,isHistory,create_user_id,operator_id,delete_flag)values(%s,%s,%s,1,'SRP_ADDITIONAL',0,'hgf',&#......