1.0.1 • Published 10 months ago

keyword-hq v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
10 months ago

使用介绍

安装

cnpm install keyword-hq

引入

import KeywordHighLight from 'keyword-hq'

在对应页面直接调用js方法

 KeywordHighLight(
    item.goodRecomment, //原来文本
    this.keywords, //高亮关键字
    '<span class="high-light-text" style="color:#00ac85">{{{text}}}span>' 
     //高亮结果html
	)
1.0.1

10 months ago