silver-loading
v1.0.0
Published
loading
Downloads
1
Readme
loading
loading
Features
- 样式示例:
Installation
- npm install silver-loading
API
new window.tvcnpt.Loading(opts)
example:
/** * @param cfg {Object} 配置参数 * container {String} loading元素容器 默认为body * showBlock {Boolean} 加载动画是否需要显示 true|false 默认为true * showText {Boolean} 加载文字是否需要显示 true|false 默认为true */ let cfg = { showText: '正在载入...' }; const loading = new window.tvcnpt.Loading(cfg);
show()
example:
loading.show();
hide()
example:
loading.hide();
setBg()
设置背景颜色example:
loading.setBg('#ff0000');
setMessage1()
设置消息1example:
loading.setMessage1('hello');
setMessage2()
设置消息2example:
loading.setMessage2('I am a loding');
remove()
删除loading节点example:
loading.remove();
Tests
- see demo folder