vue-msgs

A vue component of message
12,610 1
Install
npm install vue-msgs
Latest Version:1.0.6
Vue:2
License:MIT
Last Updated:Apr 23, 2019
Links: GitHub  ·  npm
Maintainer: theoxiong

vue-msgs

Introduction

vue-msgs is a vue component of message, you can show message by call the method of showMsg, and it will hidden when timeout.

Install

$   npm install vue-msgs --save

Usage

import with ES6
import VueMsg from 'vue-msgs'
or commonJs
const VueMsg = require('vue-msgs').default
global registration
  1. used by default
Vue.use(VueMsg)
Vue.prototype.$showMsg('success', 'this is a message')  // in app
this.$showMsg('success', 'this is a message')  // in component
  1. change props
Vue.use(VueMsg, {
  timeout: 2000,  // duration of message view
  top: 100, // offset to top of document
  right: 20 // offset to right of document
})
  1. diable register
Vue.use(VueMsg, {
  register: false,  // will not call Vue.component('VueMsg', VueMsg)
})
local registration
<vue-msg ref="vueMsg"></vue-msg>
components: { VueMsg }
this.$refs.vueMsg.showMsg('success', 'this is a message')
there is a simply demo
npm install
npm run dev

Methods

name brief param
showMsg open the message interface type: the type of message, support 'success'/'info'/'warning'/'error', info: the content of message

Related Packages

vuelidate-messages

A small library to help build validation messages from Vuelidate's state.

17,778
@websanova/vue-elements

Common element components for vue applications.

1,116
@satorijs/components

UI Components for Satori

1,155 1
@codedungeon/vue-messenger

Vue Messenger provides an expressive suite of features and customization

1,031 0

Version History

Version Released License
1.0.6 MIT
1.0.5 MIT
1.0.4 MIT
1.0.3 MIT
1.0.2 MIT