archer-vue-toast

A vue toast component for qingcheng mobile projects.

Usage no npm install needed!

<script type="module">
  import archerVueToast from 'https://cdn.skypack.dev/archer-vue-toast';
</script>

README

archer-vue-toast

A toast component for qingcheng mobile project

demo

Usage

var VueToast = require('archer-vue-toast');
Vue.use(VueToast);

Basic use:

/*
* @usage
* vm.$toast(options);
*/
vm.$toast({
    txt: 'upload error', //default: "error"
    transition: 'fadeup', //default: 'fade'
    time: 1000, //default: 2000ms
    style: {"margin-top": "200px"}
})

Use options

/*
* @usage
* var VueToast = require('archer-vue-toast');
* Vue.use(VueToast, [options])
* options work on the toast Element, supporting txt, transition, time and style
*/
var VueToast = require('archer-vue-toast');
Vue.use(VueToast, {txt: "error", transition: "fadeup", time: 1000, style: {"margin-top": "150px"}});