3.0.2 • Published 6 years ago

html-str-replace v3.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

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>

import HtmlStrRep from 'html-str-replace'
export default {
  name: 'home',
  data () {
    return {
      tHtml: '<div>this is hansin; this is Hansin; this is hanSin <span class="hansin">hansintest</span></div>',
      tkey: 'hansin'
    }
  },
  methods: {
    keyName (html, keywords) {
      const strRep = new HtmlStrRep()
      return strRep.startRep(html, keywords, '#407CFE')
    }
  }
}

update:

npm login
// 用户名:hansin
// 密码:****
// 邮箱:hansincn@gmail.com 
npm version patch 
npm publish
3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago