Closed Cheng-x-c closed 1 year ago
console.log(url); // console.log(url) console.log(pos); console.log(mavonEditor);//到这里都没问题 mavonEditor.methods.$img2Url(pos, url) })
调用方法$img2Url报错: Cannot read properties of undefined (reading 'replace') at Object.$img2Url (mavon-editor.js:1) at Index.vue?import&t=1643357202381:524 跟踪过去: $img2Url: function $img2Url(fileIndex, url) { var reg_str = "/(!\[[^\[]?\](?=\())\(\s(" + fileIndex + ")\s*\)/g" , reg = eval(reg_str); this.d_value = this.d_value.replace(reg, "$1(" + url + ")"), // 这里报错, this.$refs.toolbar_left.$changeUrl(fileIndex, url), this.iRender() },
调用方法$img2Url报错: Cannot read properties of undefined (reading 'replace') at Object.$img2Url (mavon-editor.js:1) at Index.vue?import&t=1643357202381:524 跟踪过去: $img2Url: function $img2Url(fileIndex, url) { var reg_str = "/(!\[[^\[]?\](?=\())\(\s(" + fileIndex + ")\s*\)/g" , reg = eval(reg_str); this.d_value = this.d_value.replace(reg, "$1(" + url + ")"), // 这里报错, this.$refs.toolbar_left.$changeUrl(fileIndex, url), this.iRender() },