Muse-UI-Toast
Muse-UI plugin toast
Installation
npm install muse-ui-toast -S// oryarn add muse-ui-toast
CDN
Usage
; Vue; methods: { this$toast; this$toast; this$toast; this$toast; this$toast; } ; // OrMuseUIToast;MuseUIToast;MuseUIToast;MuseUIToast;MuseUIToast;
API
config
Vue.use(MuseUIToast, config)
change default config
position: 'bottom' // position time: 2000 // show time length closeIcon: 'close' // close icon close: true // show close button successIcon: 'check_circle' // success icon infoIcon: 'info' // info icon warningIcon: 'priority_high' // warning icon errorIcon: 'warning' // error icon;
config (config)
Change default config, Will return new config;
message(options<String/Object>)
Show default message, Will return id
;
success(options<String/Object>)
Show default success message, Will return id
;
info(options<String/Object>)
Show default info message, Will return id
;
error(options<String/Object>)
Show default error message, Will return id
;
warning(options<String/Object>)
Show default warning message, Will return id
;
options
Name | Description | Type | Accepted Values | Default |
---|---|---|---|---|
message | show message content | String | — | — |
time | show time length | Number | — | 2000 |
position | show position | String | top / top-start / top-end / bottom / bottom-start / bottom-end | bottom |
close | Whether the show close button | Boolean | — | true |
icon | left icon | String | — | — |
actions | action buttons, | Array, [{ action: '', click: (id) => {} }] | — | — |
color | color | String | — | — |
textColor | message text color | String | — | — |
close (id)
close message
Dependencies Muse-UI Components
mu-snackbar
mu-button
mu-icon
Licence
muse-ui-toast is open source and released under the MIT Licence.
Copyright (c) 2018 myron