Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ElemeFE/vue-toast-mobile
A mobile toast plugin for vue.js
https://github.com/ElemeFE/vue-toast-mobile
Last synced: 3 months ago
JSON representation
A mobile toast plugin for vue.js
- Host: GitHub
- URL: https://github.com/ElemeFE/vue-toast-mobile
- Owner: ElemeFE
- Created: 2016-05-03T02:45:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-25T11:02:48.000Z (about 8 years ago)
- Last Synced: 2024-09-23T19:36:23.789Z (4 months ago)
- Language: HTML
- Homepage:
- Size: 31.3 KB
- Stars: 144
- Watchers: 19
- Forks: 55
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-vue-cn - vue-toast-mobile
- awesome-github-vue - vue-toast-mobile - VueJS的toast插件 (UI组件)
- awesome-github-vue - vue-toast-mobile - VueJS的toast插件 (UI组件)
- awesome - vue-toast-mobile - VueJS的toast插件 (UI组件)
- awesome-vue - vue-toast-mobile - toast-mobile?style=social) - VueJS的toast插件 (UI组件)
README
# Overview
vue-toast-mobile is a mobile toast plugin for vue.js.# Installation
First, install `vue-toast-mobile` from npm:
```bash
$ npm install vue-toast-mobile
```Then use it:
```Javascript
// ES6 mudule
import Toast from 'vue-toast-mobile';// CommonJS
const Toast = require('vue-toast-mobile').default;
```# Usage
Basically you can pass a string to `Toast`:
```Javascript
Toast('Upload Completed');
```
Or invoke `Toast` with an object as its configuration:
```Javascript
Toast({
message: 'Upload Completed',
position: 'bottom',
duration: 5000
});
```# API
| Option | Description | Value | Default |
|-----------|------------------------------------------------|-------------------------|----------|
| message | content of the toast | | |
| position | location of the toast relative to viewport | 'top' 'bottom' 'middle' | 'middle' |
| duration | time before the toast vanishes, in millisecond | | 3000 |
| className | custom class name of the toast | | |
| iconClass | class name of the optional icon font | | |# License
MIT