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

api-toast

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-toast

toast.A pop-up layer of information on a mobile terminal h5.

  • 1.0.6
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

功能描述:

在做h5移动端混合开发时,toast提示的弹窗更是几乎每个APP都用得到的。但是npm上又找不到合适的类似插件,又不想为了这么小的一个功能引入一整个UI框架,干脆自己写了个。

用法:

安装
npm i --save-dev api-toast

如果已安装淘宝镜像,可以使用cnpm

引入

在项目主文件(如main.js)中引入

import api from "api-toast";
window.api=api;
使用

在项目中可以使用语法:

api.toast("message",3000);

弹出toast类型的提示信息。 此方法接收两个参数,第一个参数是字符串类型的message;第二个参数是弹出提示3000ms后消失,可自定义。

==PS:webpack必须配置有css-loader跟style-loader。==

Keywords

FAQs

Package last updated on 23 Mar 2018

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