0.0.9 • Published 6 years ago

hz-modal v0.0.9

Weekly downloads
30
License
-
Repository
github
Last release
6 years ago

modal 模块

接口

toast,alert,loading,confirm,prompt,tip

安装

  • npm install hz-modal
  • 在package.json 中写入依赖
 "dependencies": {
      "hz-modal": "https://github.com/aiuluna/hz-modal.git"
  }

使用

css 手动在css中引用 @import "~hz-modal/lib/index.css";

import Modal from 'hz-modal';

alert

Modal.alert('xxx',function(){
    //确定后执行的方法, xxx必须为string
})

toast

Modal.toast('xxxx');
Modal.toast(error:'xxxx') error失败 warn提示 success成功

tip

const modal = Modal.tip('xxx');
Modal.closeModal(modal);

loading

const modal = Modal.loading(true);  true:需要背景色,false:不需要背景色
Modal.closeModal(modal);
0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago