vue组件底部外间距_Vue组件,用于突出显示单词的多个等距

vue组件底部外间距

vue-highlight-text (vue-highlight-text)

Vue component for highlight multiple istances of a word.

Vue组件用于突出显示单词的多个等距。

vue-highlight-text

安装 (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';

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
名称 类型 默认 描述
关键词 '' 消息中突出显示的单词。
敏感 布尔 真正 区分大小写
overWriteStyle 目的 {颜色:“#00C1E8”} 用于通过HTML DOM样式对象覆盖样式的自定义突出显示

翻译自: https://vuejsexamples.com/vue-component-for-highlight-multiple-istances-of-a-word/

vue组件底部外间距

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值