element [bug report] if you spell a string in the on change event of El upload control, this.onchange is not a function will be reported when the event is triggered

yi0zb3m4  于 2022-11-13  发布在  其他
关注(0)|答案(1)|浏览(148)

Element UI version

2.6.2

OS/Browsers version

win10/chrome版本 95.0.4638.69(正式版本) (64 位)

Vue version

2.6.10

https://codepen.io/hrbeta/pen/gOxJXvP

Steps to reproduce

点击上传文件,随便选择一张图片,确认,然后控制台报错。TypeError: this.onChange is not a function

What is Expected?

应该能够根据方法名称,找到方法,进入方法。

What is actually happening?

实际上以字符串的形式拼写onchange方法,就找不到方法了

ibrsph3r

ibrsph3r1#

Translation of this issue:

Element UI version

2.6.2

OS/Browsers version

Win10 / Chrome version 95.0.4638.69 (official version) (64 bit)

Vue version

2.6.10

https://codepen.io/hrbeta/pen/gOxJXvP

Steps to reproduce

Click upload file, select a picture casually, confirm, and then report an error on the console. TypeError: this.onChange is not a function

What is Expected?

You should be able to find the method and enter the method according to the method name.

What is actually happening?

In fact, if you spell the onchange method as a string, you can't find the method

相关问题