GithubHelp home page GithubHelp logo

angleguan / vue-toast Goto Github PK

View Code? Open in Web Editor NEW

This project forked from frehaiku/vue-toast

0.0 0.0 0.0 261 KB

A Vue1 component for showing friendly operation tip to user. :white_check_mark:

Home Page: https://frehaiku.github.io/vue-toast/

License: MIT License

JavaScript 86.24% HTML 1.96% Vue 10.27% CSS 1.52%

vue-toast's Introduction

Vue-Toast

A Vue component for showing friendly operation tip to user.
vue2+ version is working

Install

Using npm to install vue-cushy-toast

npm install vue-cushy-toast

Usage

In your .vue file

<template>
  <vue-toast v-ref:toast message="tip..."></vue-toast>
</template>

<script>
    import VueToast from 'vue-cushy-toast'
    export default {
        components: {
          VueToast
        },
        ready () {
              this.$refs.toast.showMessage()
              // your also can manually inject message param
              // this.$refs.toast.showMessage('good job')
            },
      }
</script>

Params

param type description default optional required
message String toast content '' \w No
position String toast location 'bottom middle' 'bottom middle', 'top middle' No
sustain Number toast sustain time (ms) 2000 \d No
animate String toast show animation scale 'opacity', 'scale' No
options Object callback with toast {} Object No

the options params contains two key-value

param type description
onHide Function before show callback
onShow Function after show callback

Methods

  • showMessage(String msg); manually set toast's content

Lisence

MIT

vue-toast's People

Contributors

frehaiku avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.