nw-toast

toast组件

Usage no npm install needed!

<script type="module">
  import nwToast from 'https://cdn.skypack.dev/nw-toast';
</script>

README

nw-toast

toast组件

安装

$ yarn add nw-toast

API

import toast from 'nw-toast';

toast(options)

显示toast

  • options: required Object 选项
    • text: required String 内容
    • delay: required Number 多久后隐藏,单位为毫秒,默认2000
import toast from 'nw-toast';

toast({
    text: '你好',
    delay: 3000
});
import Toast from 'nw-toast/es/toast';

Toast类,可以继承后再做自定义