1.0.5 • Published 4 years ago

vue-confirm-linhdanchu v1.0.5

Weekly downloads
16
License
-
Repository
-
Last release
4 years ago

Installing

Using npm:

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

Example

this.$confirm('this is message', 'this is title', custom)
    //custom is an Object
    .then(() => {
        // act upon confirmation
    }).catch(() => {
        // act when not confirmed
    })

custom option

NameTypeAll valuesDefault valueDescription
confirmButtonTextString-OKText for button confirm.
cancelButtonTextString-CancelText for button not confirm.
typeStringsuccess, warning, error, info, defaultdefaultColor of button confirm (By default, no type is required).

Example:

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

or

//laravel mix + vuejs
window.Vue = require('vue');
require('vue-confirm-linhdanchu');
import 'vue-confirm-linhdanchu/src/confirm.css';
methods: {
  showConfirm() {
    this.$confirm('this is your message','this is your title', {
        confirmButtonText: 'OK',
        cancelButtonText: 'Cancel',
        type: 'default',
    }).then(() => {
        // act upon confirmation
    }).catch(() => {
        // act when not confirmed
    });
  }
}
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