Skip to content

chongxx/weapp_toast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

一个简单的微信小程序 Toast

-- 因为微信提供的 toast 在显示的时候不能去掉图标, 而图标只提供了 loading success 在很多场景下不适用.

所以有了下面这个👇 图片名称

####如何使用这个toast?

  1. 建议将 toast.wxmltoast.js 分别拷贝到你的 templateutil 文件夹.

  2. 在需要使用这个 toast 功能的页面 wxml文件 顶部 include toast.wxml, 在使用的页面 js 文件中引入 toast.js

  3. 调用

     toast.showToast({
     	context: this,
     	title: 'this is toast content'
     })
    

doc:

参数 类型 必填 说明
context object 调用这个 toast 的页面的 this 对象
title String 提示的内容
duration Number 提示的延迟时间,单位毫秒,默认:1500

About

很简单的微信小程序toast

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published