加上正则表达式就行了,

this.commentContent是正常进行双向绑定的值
this.commentContent.replace(/<(style|script|iframe)[^>]*?>[\s\S]+?<\/\1\s*>/gi,'').replace(/<[^>]+?>/g,'').replace(/\s+/g,' ').replace(/ /g,' ').replace(/>/g,' ')

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-11-19
  • 2022-12-23
相关资源
相似解决方案