## Spin 局部加載
當區塊正在獲取數據中時可使用,適當的等待動畫可以提升用戶體驗。
需要父級有`position`樣式:`relative`/`absolute`

### 代碼示例
默認風格
> 設置`theme`屬性為`default`,默認為`default`,可不設置。

```html
<cvu-spin theme="default"></cvu-spin>
```
方塊旋轉風格
> 設置`theme`屬性為`box`

```html
<cvu-spin theme="box"></cvu-spin>
```
icon圖標旋轉風格
> 設置`theme`屬性為`icon`,`icon`屬性設置為iview-icon圖標type值,默認為`ios-loading`。

```html
<cvu-spin theme="icon" icon="ios-loading"></cvu-spin>
```
整頁加載
使用內置的`$cvuSpin`方法可以全局加載。
通過直接調用以下方法來使用組件:
* `this.$cvuSpin.show()`
* `this.$cvuSpin.hide()`
* `this.$cvuSpin.config(options)`
* `this.$cvuSpin.destroy()`
以上方法隱式的創建及維護Vue組件。函數及參數說明如下:
| 函數名 | 說明 | 參數 |
| --- | --- | --- |
| show| 顯示 | 無 |
| hide | 隱藏 | 無 |
| config | 全局配置 | options |
| destroy | 全局銷毀 | 無 |
### props
| 屬性 | 說明 | 類型 | 默認值 |
| --- | --- | --- | --- |
| theme | 主題風格,可選值為default / box / icon | String | default |
| icon | icon圖標type值 | String | ios-loading |
| background | 背景色 | String | rgba(255, 255, 255, .6) |
| color | 文字 / 加載元素顏色 | String | #0382D9 |
| z-index | 層級 | Number | 9999 |
| content | 提示文字 | String | 加載中,請耐心等待 |
- 介紹
- 安裝
- 快速上手
- 組件
- 基礎
- Button 按鈕
- ButtonGroup 按鈕組
- 布局
- Card 卡片
- Col 列
- Collapse 折疊面板
- Divider 分割線
- Empty 空數據
- Row 行
- 導航
- Paginator 分頁
- PaginatorMini 分頁
- Tab 標簽頁
- 表單
- Cascader 級聯選擇
- PasswordStrength 密碼強度
- Print 局部打印
- Table 表格
- Upload 文件上傳
- 視圖
- Calendar 日歷
- Drawer 抽屜
- Loading 加載
- Message 全局提示
- Modal 對話框
- Notification 通知菜單
- Poptip 氣泡提示
- Preview 圖片預覽
- PreviewPdf pdf文件預覽
- Tooltip 文字提示
- Tree 樹形控件
- 方法
- Copy 復制到剪貼板
- DescNotice 桌面消息通知
- Html2Pdf 導出pdf
- Storage 定時存儲
- 其他
- BackTop 返回頂部
- NumberScroll 數字動畫
- NumberZero 數字前補零
- Spin 局部加載
- Tcplayer 播放器