vue-hyb-notification
v1.0.4
Published
vue-hyb-notification
Downloads
12
Readme
vue-hyb-notification
Demo
Installation
npm
$ npm install vue-hyb-notification
Requirements
- Vue.js
^2.0.0
import notification from 'vue-hyb-notification'
Vue.use(notification);
<template>
<div id="app">
<span @click="send"></span>
</div>
</template>
<script>
export default {
name: 'App',
data (){
},
methods : {
ccc (){
alert('callback')
},
send(time){
this.$notify({ type : 'warning' ,title : 'title' ,content : 'content' });
// or
this.$notify({ title : 'title' ,content : 'content' ,duration : 2500 });
// or
this.$notify({ title : 'title' ,content : 'content' ,isautoclose : true});
//or
this.$notify({ type : "warning" ,title : "title" ,content : [{ text : "content" ,fn : this.ccc } ,{ text : "other message" }] ,duration : 2500 });
}
}
}
</script>
API
- title
title title
- content
content Array
- duration
duration(disappear time) default 2500
- isautoclose
isautoclose(Disappear automatically) true or false , default false
- type
type msg or error or success or warning ,default no