方法 function replaceImg(content) { return content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) { return `<img src=${parseURL(capture)} />` }) } 调用 this.$replaceImg(content)