1.6.2 • Published 5 years ago

vue-highlight-text v1.6.2

Weekly downloads
321
License
MIT
Repository
github
Last release
5 years ago

vue-highlight-text

NPM version NPM downloads Build Status

Vue component for highlight multiple instances of a word

npm.io

Installation

# with yarn
yarn add vue-highlight-text

# with npm
npm install --save vue-highlight-text

Use component

import Vue from 'vue';
import HighlightText from 'vue-highlight-text';

Vue.component('HighlightText', HighlightText);

Use directive

import Vue from 'vue';
import highlight from 'vue-highlight-text/public/directive.min.js';

Vue.directive('highlight', highlight);

In file vue

<!-- component -->
<HighlightText :keyword="keyword" :sensitive="sensitive">{{msg}}</HighlightText>
<!-- Directive -->
<span v-highlight="{keyword: keyword}">{{msg}}</span>

Props or value of directive

NameTypeDefaultDescription
keywordstring''word for highlight in message.
sensitivebooltruehighlight with case sensitive
overWriteStyleObject{color: '#00C1E8'}custom highlight for overwrite style by HTML DOM Style Object
1.6.2

5 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago