api按鈕,封裝了按鈕點擊事件,點擊之后按照指定的方式(methods)將數據(param)發送至接口(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
| refresh-grid | 是否自動刷新表格,提供一個boolean型則刷新默認表格,可以提供一個string類型來指定filter | Boolean / String | |
| 其他 | 支持所有el-button屬性 | | |
## 事件
| 事件 | 說明 | 參數
| --- | --- | ---
| api-before| api請求發送之前事件 | cancleFn:取消后續操作方法,在事件里調用此方法,將會取消后續請求。
| api-after | 請求完成方法,無論正確與否都會拋出 | response:響應內容。
| api-success | 請求結果為正確時發出的事件 | response:響應內容。
| api-fail | 請求結果為失敗時發出的事件 | response:響應內容。
| click | 如果使用了此事件,則其他事件都將不會拋出。通常用于覆蓋按鈕的事件。 | 無
- 序言
- 安裝
- 組件查詢
- 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說明