vue 文本显示组件
提示词 (vue-highlight-words)
A simple port from react-highlight-words
一个来自react-highlight-words的简单端口
Vue component to highlight words within a larger body of text.
Vue组件可突出显示较大文本中的单词。
为什么? (Why?)
It uses render
to handle the highlighted text instead of using v-html
or el.innerHtml
.
它使用render
处理高亮显示的文本,而不是使用v-html
或el.innerHtml
。
用法 (Usage)
To use it, just provide it with an array of search terms and a body of text to highlight.
要使用它,只需为其提供搜索词数组和要突出显示的正文即可。
<template>
<div id="app"&g