Cannot read properties of undefined (reading 'setHTML')
时间: 2023-10-17 11:36:18 浏览: 131
这个错误是由于在代码中尝试读取一个未定义的属性 'setHTML'引起的。根据你提供的引用和引用,错误的具体位置是在这个代码片段中:
editor.config.uploadImgHooks = {
before:function(xhr){
console.log(this.state.goodsguid);
},
}
根据引用,错误的提示信息是"Cannot read properties of undefined (reading 'goodsguid')",这意味着在这个代码块中,'this.state'是未定义的。因此,在这个上下文中,'this.state.goodsguid'是无效的。
要解决这个问题,你需要确保在这个代码块中正确定义和设置了 'this.state',并且确保 'this.state.goodsguid'存在。你可以参考引用中的示例代码来检查你的代码是否正确设置了 'this.state.goodsguid'。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [wangEditor 上传图片,回调函数 Cannot read properties of undefined](https://blog.csdn.net/datouniao1/article/details/121333920)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
相关推荐
![text/html](https://img-home.csdnimg.cn/images/20210720083451.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)