HtmlStrRep for html string repalce with keywords
HtmlStrRep install
npm install html-str-replace --save
HtmlStrRep for ES6
// 使用<template> <div class="home"> <h3>Html rep Test</h3> <h4 v-html="keyName(tHtml, tkey, '#407CFE')"></h4> </div></template> name: 'home' { return tHtml: '<div>this is hansin; this is Hansin; this is hanSin <span class="hansin">hansintest</span></div>' tkey: 'hansin' } methods: { const strRep = return strRep }
update:
npm login// 用户名:hansin// 密码:****// 邮箱:hansincn@gmail.com npm version patch npm publish