1.1.8 • Published 5 years ago

vuejs-alert v1.1.8

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Installation

npm i vuejs-alert --save

Usage

//main.js
import Alert from 'vuejs-alert';
Vue.use(Alert);

//.vue files
/*show component*/
this.$alert.show({text: 'hello world'});
/*close component*/
this.$alert.close();

Preview

vuejs-alert

Option

use option to custom the component.
option is an object.
Use option in the following ways:

  • Set option once.
this.$alert.show(option);
  • Set option globally, the next time you show the component, option would still be effective.
Vue.use(Alert, option);

option available:

keytypedefaultdescription
textstringalert text
confirmTextstring"确定"text of confirm button
cancelTextstring"取消"text of cancel button
confirmCallbackfunctionfunction to call when confirm button is clicked
cancelCallbackfunctionfunction to call when cancel button is clicked
durationnumberauto close time, 1000 = 1 second
backgroundstring0.5opacity of background color, range from 0 to 1

License

The MIT License

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago