New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

anima-toast

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anima-toast

The best project ever.

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

toast


简单的提示信息


Usage

成功、失败之类的提示信息,显示后延迟2s(默认)隐藏

  var $ = require('anima-yocto-lite');
  var Toast = require('anima-toast');
  var toast = new Toast({
      content : '成功加载', //文本
     // hideDelay : 2000,  //延迟隐藏的时间
      type : 'success' //类型,默认为none
  });
  toast.show();

  //修改,再次显示
  $('#btnChange').on('click',function(){
    toast.change('加载失败','fail');
    toast.show();
  });

Api

配置项

content String
  • 提示信息
type String 默认 'none'
  • 'none' : 不显示icon
  • 'success','fail' 会增加 am-icon-success 或者 am-icon-fail 的icon
  • 'xxx': 任意类型,附加 am-icon-xxx的样式

方法

show() 显示
hide() 隐藏
chang(content,type) 更改类型
  • content : 提示信息
  • type : 提示类型

FAQs

Package last updated on 25 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc