1.0.1 • Published 4 years ago

vue-alert-linhdanchu v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

Installing

Using npm:

$ npm install vue-alert-linhdanchu --save-dev

Example

this.$confirm('this is message', 'this is title', {
    // custom and callback
});

custom option

NameTypeAll valuesDefault valueDescription
confirmButtonTextString-OKText for button confirm.
typeStringsuccess, warning, error, info, defaultdefaultColor of button confirm (By default, no type is required).
callbackFunction--confirm => callback()

Example:

// vue cli
import Vue from 'vue'; 
import vueAlert from 'vue-alert-linhdanchu';
import 'vue-alert-linhdanchu/src/alert.css';
Vue.use(vueAlert);

or

//laravel mix + vuejs
window.Vue = require('vue');
require('vue-alert-linhdanchu');
import 'vue-alert-linhdanchu/src/alert.css';
methods: {
  showAlert() {
    this.$confirm('this is your message','this is your title', {
        confirmButtonText: 'OK',
        type: 'default',
        callback: () => {
            // act confirmation
        }
    })
  }
}
1.0.1

4 years ago

1.0.0

4 years ago