🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

vue-bubble

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-bubble

基于vue实现的仿QQ消息气泡拖拽插件。 #### 效果图

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

消息气泡拖拽插件 && a plugin based vuejs which can let message dom like bubble to drag into disappeared

基于vue实现的仿QQ消息气泡拖拽插件。

效果图

安装 && install

npm install vue-bubble

如何使用 && Usage

  • 引入
const vueBubble from 'vue-bubble'
Vue.use(vueBubble)
  • 使用 v-bubble指令对应的是一个对象。该对象有如下可选值:
  • value

必选,消息气泡显示的内容,value为0的时候,气泡默认是不显示的。

  • show

可选,是否显示消息气泡,true为显示,false为隐藏。需要注意的是,该属性优先级大于value 比如,value=0,show为true,这种情况show起作用,value忽略,所以气泡显示。

  • afterHide

可选,回调函数,气泡拖拽消失之后执行的回调,一般用于重置value。afterHide如果想带参数的话,可以使用下面的方式来配置,利用Function.prototype.bind函数把要携带的参数传递过去。

下面代码是github仓库中的demo代码片段。

<i v-bubble="{show:item.show,afterHide: (hide.bind(this,item)),value : item.count}" class="msg"></i>

FAQs

Package last updated on 08 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts