I get a text from elasticsearch,this is some keyword be surrounded with '', also some tags should only be displyed formexample: original text:"/DocumentCMBCCNXXX" rendered text: "/DocumentCMBCCNXXX";CMBCCNXXX displayed with red color expect text: "/DocumentCMBCCNXXX ";CMBCCNXXX displayed with red color
expect v-html only render tag- to html
resolved:
content.replace(/</g,"<").replace(/>/g,">").replace("<span style='color:red'>","<span style='color:red'").replace("</span≥","</span>")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.