Text Highlight 文字高亮
文字高亮组件,用于高亮文字。
基础用法
使用 search
属性来指定需要高亮的文字。使用 search-color
属性来指定高亮的颜色。
search
属性为正则表达式字符串。
html
<xtt-text-hl search="ex">text</xtt-text-hl>
<xtt-text-hl search="i|l|h" search-color="red">this is the highlight custom element</xtt-text-hl>