1.0.1 • Published 4 years ago
vue-alert-linhdanchu v1.0.1
Installing
Using npm:
$ npm install vue-alert-linhdanchu --save-dev
Example
this.$confirm('this is message', 'this is title', {
// custom and callback
});
custom option
Name | Type | All values | Default value | Description |
---|---|---|---|---|
confirmButtonText | String | - | OK | Text for button confirm. |
type | String | success, warning, error, info, default | default | Color of button confirm (By default, no type is required). |
callback | Function | - | - | 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
}
})
}
}