@aburai/vue-highlight 中文文档教程
vue-highlight
UNDER CONSTRUCTION - use at own risc and create issues
Introduction
vue-highlight
是 Vue.js 的插件。 功能包括:
- options for finetuning (see default options)
- option for debugging (logs highlighting workflow)
Install
来自 npm:
$ npm install @aburai/vue-highlight --save
$ yarn add @aburai/vue-highlight
Usage
append plugin to Vue
import Vue from 'vue'
import VueHighlight from '@aburai/vue-highlight'
Vue.use(VueHighlight)
default options
{
wordsOnly: false,
caseSensitive: false,
notGlobal: true,
defaultSelector: 'div',
nodeName: 'span',
className: 'v-highlight',
classNameStopWord: 'v-highlight v-highlight--stopword',
ignore: 'v-highlight--ignore',
splitter: [',', '/'],
debug: false
}
use plugin
onInput(value) {
this.$highlight(value, 'td', {
wordsOnly: false,
caseSensitive: false,
notGlobal: true
})
}
.v-highlight {
padding: 0 1px;
font-size: 105%;
font-weight: 500;
color: #000;
background: yellow;
&.v-highlight--stopword {
background: red;
}
}
License
Copyright (c) 2019-present André Bunse (aburai)
Special Thanks
to vue-router 作为一个好的 vue 插件模板的样板
vue-highlight
UNDER CONSTRUCTION - use at own risc and create issues
Introduction
vue-highlight
is a plugin for Vue.js. Features include:
- options for finetuning (see default options)
- option for debugging (logs highlighting workflow)
Install
From npm:
$ npm install @aburai/vue-highlight --save
$ yarn add @aburai/vue-highlight
Usage
append plugin to Vue
import Vue from 'vue'
import VueHighlight from '@aburai/vue-highlight'
Vue.use(VueHighlight)
default options
{
wordsOnly: false,
caseSensitive: false,
notGlobal: true,
defaultSelector: 'div',
nodeName: 'span',
className: 'v-highlight',
classNameStopWord: 'v-highlight v-highlight--stopword',
ignore: 'v-highlight--ignore',
splitter: [',', '/'],
debug: false
}
use plugin
onInput(value) {
this.$highlight(value, 'td', {
wordsOnly: false,
caseSensitive: false,
notGlobal: true
})
}
.v-highlight {
padding: 0 1px;
font-size: 105%;
font-weight: 500;
color: #000;
background: yellow;
&.v-highlight--stopword {
background: red;
}
}
License
Copyright (c) 2019-present André Bunse (aburai)
Special Thanks
to vue-router as a boilerplate for a good vue plugin template