All Projects → FoxDaxian → barrage

FoxDaxian / barrage

Licence: other
vue2弹幕

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
Vue
7211 projects
HTML
75241 projects

Projects that are alternatives of or similar to barrage

vue-viewload
vue图片懒加载lazyload,依赖vue2.0以上版本。支持图片或者其他资源进入可视区域后加载。
Stars: ✭ 77 (+196.15%)
Mutual labels:  vue2
awesome-danmaku
一款轻量、适用于 H5 弹幕场景的 JS lib。🚀🚀
Stars: ✭ 35 (+34.62%)
Mutual labels:  barrage
Vue2-All
Vue2 + Vue-router2 + Vuex + Webpack + axios + jwt
Stars: ✭ 67 (+157.69%)
Mutual labels:  vue2
vue-simple-lightbox
A Vue.js component for touch-friendly image lightbox for mobile and desktop with simple-lightbox
Stars: ✭ 58 (+123.08%)
Mutual labels:  vue2
vue-input-streaming
A Vue2 Input Streaming RealTime And Two Way Data Binding Broadcasting with Pusher
Stars: ✭ 24 (-7.69%)
Mutual labels:  vue2
vue-notification-bell
Vue.js notification bell component.
Stars: ✭ 64 (+146.15%)
Mutual labels:  vue2
element-ui-saas-extend
基于ElementUI开发的SaaS业务扩展
Stars: ✭ 14 (-46.15%)
Mutual labels:  vue2
yinyangshi-assistant
阴阳师查询助手
Stars: ✭ 14 (-46.15%)
Mutual labels:  vue2
vue-lock
Vue2 手势解锁密码 / 支付宝手势解锁
Stars: ✭ 45 (+73.08%)
Mutual labels:  vue2
osiris
🎨 A Vue.js 2.0 universal responsive UI component library
Stars: ✭ 36 (+38.46%)
Mutual labels:  vue2
mipjz
thinkphp5
Stars: ✭ 25 (-3.85%)
Mutual labels:  vue2
DncVueSample
A Vue.js + iview static html admin template project.
Stars: ✭ 17 (-34.62%)
Mutual labels:  vue2
multiSpa
基于Vue+Express+Webpack的多页面系统
Stars: ✭ 51 (+96.15%)
Mutual labels:  vue2
vue2-typeahead
A vue component of typeahead
Stars: ✭ 34 (+30.77%)
Mutual labels:  vue2
vue-qs-form
Vue quick step form, Vue快速问卷表单
Stars: ✭ 16 (-38.46%)
Mutual labels:  vue2
office-fabric
johannes-z.github.io/office-fabric/
Stars: ✭ 12 (-53.85%)
Mutual labels:  vue2
vue-simple-upload-component
A simple upload component for Vue.js 2.x
Stars: ✭ 14 (-46.15%)
Mutual labels:  vue2
novel-vue
一个基于vue2.0开发的小说网站
Stars: ✭ 102 (+292.31%)
Mutual labels:  vue2
vue-icon
Maybe it is the smallest vue component that contains all the feather icons
Stars: ✭ 44 (+69.23%)
Mutual labels:  vue2
vue2
【🔥Vue.js资讯📚】目前web前端开发非常火爆的框架;定时更新,欢迎 Star 一下。
Stars: ✭ 415 (+1496.15%)
Mutual labels:  vue2

VUE2-barrage

用法:

//首先下载安装
npm install vue2-barrage --save
//然后在引入到你的vue中
import barrage from "vue2-barrage";
//Vue调用
Vue.use(barrage);
//组件绑定mounted钩子函数内执行初始化方法,返回发送弹幕方法
mounted(){
	this.send = this.$start(this.$refs.barrage_wrap);
}
//vue的methods内任意方法里添加send方法,注意,请务必传入空对象参数
this.send({});

API说明:

$start方法:初始化方法,返回一个发送弹幕的方法
参数 说明
1 需要被插入弹幕的元素
2     弹幕出现大体位置,默认值为全部,即被插入弹幕的总高的随机位置,可传入数组形式,eg:[0.2,0.5],大小顺序不限,但必须为大于0 小于1的小数

send:$start返回的发送弹幕的方法
只能传入一个配置选项参数

默认不传的情况下,请写入{}(空对象)

配置选项说明

  • text:发送弹幕的文字内容,默认为默认弹幕
  • color:字体颜色,默认为黑色
  • speed:弹幕速度,默认为5
  • classname:样式类名,目前有style1~3三种选择,分别代表蓝色、绿色、红色

其他

弹幕小例子

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].