1.0.6 • Published 4 years ago

vuetify-notify v1.0.6

Weekly downloads
16
License
MIT
Repository
github
Last release
4 years ago

Guild

Install

npm i vuetify-notify
or
yarn add vuetify-notify

Setup

main.js

import VuetifyNotify from 'vuetify-notify';

Vue.use(notify, {
  vuetify,
  options: {
    toast: {
      x: "right",
      y: "top",
      color: "green"
    },
    dialog: {
      width: 400
    }
  }
});

Nuxt Setup

plugins/toast.js

import Vue from 'vue'
import VuetifyNotify from 'vuetify-notify'

export default ({ app }, inject) => {
  window.onNuxtReady(() => {
    Vue.use(VuetifyNotify, {
      vuetify: app.vuetify,
      container: '__nuxt',
      options: {
        toast: {
          x: 'right',
          y: 'bottom',
          color: 'green'
        },
        dialog: {
          width: 400
        }
      }
    })
  })
}

Use

this.$notify.toast(text, options).then(result => log(result))

this.$notify.show(data, options).then(result => log(result))
this.$notify.confirm(data, options).then(result => log(result))
this.$notify.promt(data, options).then(result => log(result))

Options default

Toast options

  • x: left | center | right : string (default: 'right')
  • y: top | bottom : string (default: 'top')
  • color: string (default: 'primary')
  • timeout: integer (default: 5000)

Dialog options

  • width: integer (default: 500)
1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago