Coder Social home page Coder Social logo

wx_toast's Introduction

微信小程序自定义Toast

概述

wx_toast 是仿照微信小程序提供的 showToast 功能,提供视觉一致的自定义组件,弥补小程序showToast功能上的不足(如只能显示success、loading两种icon,且icon不可去除,持续时间最大10秒等)。

预览

如何使用

将项目中的toast文件夹拷贝进去项目中,以自定义组件的方式使用它,就可以了。具体使用方法可以参看项目中的index page。

Api

Toast.showLoading

显示 loading 提示框, 需主动调用 Toast.hideLoading 才能关闭提示框

Toast.hideLoading

隐藏 loading 提示框

Toast.showMessage

不带图标弱提示框,支持callback

Toast.showSuccess

成功提示框,带有success图标,支持callback

Toast.showError

错误提示框,带有error图标,支持callback

wx_toast's People

Contributors

wjustin avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  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.