1.0.2 • Published 4 years ago

x-mask v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

x-mask

遮罩层loading效果,可以设置container进行指定容器渲染。

npm安装

npm install --save x-mask

代码示例

import Mask from 'x-mask';
let m = Mask.show();
setTimeout(()=>{
    Mask.hide()
},2000) 

Api

本插件依赖于x-dialog插件,所有api也继承至x-dialog,详情请点击 x-dialog

container:htmlElement

指定容器的dom

全局配置

提供setDefaultOptions对全局的参数进行重写

Mask.setDefaultOptions({
  content: <div>加载中...</div>
});

关于作者

https://github.com/tianxiangbing