ruleTitle(text, val) {
    if (!val) return text;
    const result = text.replace(
        new RegExp(val, "g"),
    `    <span class="primary_title">${val}</span>`
    );
    return result;
}

//这个是HTML页面中传递的值

v-html="ruleTitle(item.title,Inputvideo)"

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2021-12-24
猜你喜欢
  • 2022-12-23
  • 2021-04-29
  • 2021-06-20
  • 2021-05-30
  • 2022-12-23
相关资源
相似解决方案