api請求管理組件,用組件方式進行api請求。注意:此組件需要手動調用方法觸發請求。
## 屬性
| 參數 | 說明 | 類型 | 可選值 | 默認值
| --- | --- | --- | --- | ---
| api | 點擊后請求的api地址 | string | 必填 |
| api-method | 請求方法 | string | get,post,put,delete | post
| api-param | 請求參數 | object | |
| success-tip | 請求返回成功結果之后采用什么方式提醒 | string | none,message,alert,notify | message
| fail-tip | 請求返回失敗結果之后采用什么方式提醒 | string | none,message,alert,notify | alert
| value/v-model | 響應內容。 | Array/Object | |
| loading-target | api請求過程中會有一個loading內容,這個屬性可以用來指定loading的加載目標。 | NodeElement | |
## 方法
| 參數 | 說明 | 參數
| --- | --- | ---
| requestApi | 開始根據設定的屬性進行請求,并觸發相關屬性。 | 無
## 事件
| 事件 | 說明 | 參數
| --- | --- | ---
| api-before | 進行api請求前 | cancleFn:請求取消方法,在方法里執行此方法可停止請求api。
| api-success | 進行api完成并返回成功標識后的事件處理。 | response:響應內容。
| api-fail | 進行api完成并返回失敗標識后的事件處理。 | response:響應內容。
## 插槽
| 插槽名 | 說明
| --- | ---
- 序言
- 安裝
- 組件查詢
- buttons
- WdApiButton
- WdDrawerButton
- WdRefreshButton
- WdRouteButton
- WdConfirmButton
- datagrid
- WdDatagrid
- WdGridDeleteButton
- WdGridEnableButton
- editgrid
- WdEditgrid
- WdEditgridCell
- element
- WdCard
- WdCollapse
- WdDrawerIframe
- WdIframe
- WdLabel
- WdSplitLabel
- WdDetail
- WdToolBar
- WdRepeater
- WdApiManager
- form
- WdDataForm
- WdSelect
- WdRadioList
- WdCheckboxList
- WdUploadImage
- search
- WdSearchCheckbox
- WdSearchDatepick
- WdSearchForm
- WdSearchInput
- WdSearchRadio
- WdSearchSelect
- tree
- WdTree
- 內置服務
- ajax服務
- 消息服務
- 框架方法
- tab操作
- 其他
- demo說明