replace string for html
npm install html-str-replacebash
npm install html-str-replace --save
`
$3
`js// 使用
Html rep Test
import HtmlStrRep from 'html-str-replace'
export default {
name: 'home',
data () {
return {
tHtml: '
this is hansin; this is Hansin; this is hanSin hansintest',
tkey: 'hansin'
}
},
methods: {
keyName (html, keywords) {
const strRep = new HtmlStrRep()
return strRep.startRep(html, keywords, '#407CFE')
}
}
}`
$3
`js
npm login
// 用户名:hansin
// 密码:**
// 邮箱:hansincn@gmail.com
npm version patch
npm publish
``