vue2-easily-notify

An easily notify Component Whitch adapts mobile automatically.

Usage no npm install needed!

<script type="module">
  import vue2EasilyNotify from 'https://cdn.skypack.dev/vue2-easily-notify';
</script>

README

Vue.js notifications, automatically adapt PC and mobile.

Demo: To be added. Github: To be added.

Install

npm install --save vue-easily-notify

How to

In main.js:

import Vue           from 'vue'
import Notifications from 'vue-easily-notify'

Vue.use(Notifications)

In any of your vue files:

this.$hnotify.success({
  text: 'success !',
  mode: 'root'
});
this.$hnotify.info({
  text: 'info !',
  mode: 'root'
});
this.$hnotify.warnning({
  text: 'warnning !',
  mode: 'root'
});
this.$hnotify.error({
  text: 'error !',
  mode: 'root'
});

API

  this.$hnotify({
    // root: Optional,default value is '',
    // Mode of the mobile size view. Based on the root tag's font-size,
    // When your html tag's font-size is 16 , it should be 'root',
    // Other cases it should be ''.
    root: '',
    // text: Content of notify action.
    text: 'This is content '
  })