# silver-loading

> loading

Latest version **1.0.0** (published 2016-09-01) · 0 weekly downloads

## Install

```sh
npm install silver-loading
pnpm add silver-loading
yarn add silver-loading
bun add silver-loading
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-09-01 |
| First published | 2016-09-01 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 澜嵚 |
| Maintainers | shaozj |
| Keywords | Loading |

## Links

- npm: https://www.npmjs.com/package/silver-loading
- npm.io page: https://npm.io/package/silver-loading

## Dependencies (2)

- [silver-base](https://npm.io/package/silver-base.md) ~0.0.1
- [silver-display](https://npm.io/package/silver-display.md) ~0.0.1

## Recent versions

- 1.0.0 (latest) — 2016-09-01

## README

loading

## loading

#### Features

- 样式示例：

![](https://img.alicdn.com/tps/TB1K5E9MVXXXXcaapXXXXXXXXXX-1280-720.jpg)


#### 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()**  
	设置消息1

	> example:
	
		loading.setMessage1('hello');
		
- **setMessage2()**  
	设置消息2

	> example:
	
		loading.setMessage2('I am a loding');
		
- **remove()**  
	删除loading节点

	> example:
	
		loading.remove();


#### Tests

- see demo folder

---
_Source: https://npm.io/package/silver-loading · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
