mark-keyword-style
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

📚 文档

位置 链接
npm仓库 链接

目录结构

# markKeywords

├─ src
│  ├─ index.js          # 模块代码
├─ package.json      #  配置信息

🚀 开发

安装

npm i mark-keyword-style --save

使用

import { markKeywords } from "mark-keyword-style";


#参数说明
    ## markKeywords(optionList,keywords,customKey={fieldName:'',color:'red',newFieldName: 'customLabel'})
    ## optionList(required)
        --搜索结果的对象数组
    ## keywords(required)
        --搜索的字段
    ## customKey(required)
        --用户自定义搜索关键词样式的处理
        ###customKey.fieldName(required)
            --用户搜索对应的字段名称
        ###customKey.color(selected)
            --用户可自定义搜索结果关键字颜色渲染样式
        ###customKey.newFieldName:(selected)
            --用户自定义新生成的字段

Readme

Keywords

Package Sidebar

Install

npm i mark-keyword-style

Weekly Downloads

1

Version

1.1.4

License

ISC

Unpacked Size

19.1 kB

Total Files

8

Last publish

Collaborators

  • huhan_qiu