react-highlight-words:React组件在较大的文本正文中突出显示单词

时间:2021-05-03 10:35:08
【文件属性】:
文件名称:react-highlight-words:React组件在较大的文本正文中突出显示单词
文件大小:76KB
文件格式:ZIP
更新时间:2021-05-03 10:35:08
JavaScript React组件在较大的文本正文中突出显示单词。 查看演示。 用法 要使用它,只需为其提供搜索词数组和要突出显示的正文即可。 import React from "react" ; import ReactDOM from "react-dom" ; import Highlighter from "react-highlight-words" ; ReactDOM . render ( < Highlighter highlightClassName = "YourHighlightClass" searchWords = { [ "and" , "or" , "the" ] } autoEscape = { true } textToHighlight = "The dog is chasing the cat. Or perhaps they'r
【文件预览】:
react-highlight-words-master
----.gitignore(174B)
----karma.conf.js(655B)
----webpack.config.dev.js(852B)
----README.md(4KB)
----webpack.config.dist.cjs.js(247B)
----LICENSE(1KB)
----website()
--------index.css(153B)
--------Application.js(728B)
--------index.js(367B)
--------index.html(264B)
--------Application.css(505B)
----webpack.config.website.js(881B)
----package.json(3KB)
----src()
--------test-utils.js(1KB)
--------Highlighter.example.js(3KB)
--------Highlighter.test.js(12KB)
--------Highlighter.js(4KB)
--------tests.js(321B)
--------index.js(81B)
--------Highlighter.example.css(604B)
----.babelrc(438B)
----webpack.config.dist.umd.js(245B)
----webpack.config.dist.base.js(590B)
----.npmignore(63B)
----yarn.lock(211KB)
----circle.yml(88B)

网友评论