add custom-action

master
git 8 years ago
parent 3285dd30e6
commit 586c2bb72b

@ -377,6 +377,31 @@ The `name` attribute of the input tag
### custom-action
Custom upload method
* **Type:** `async Function`
* **Default:** `undefined`
* **Details:**
`custom-action` priority than `put-action, post-action`
* **Usage:**
```html
<file-upload :custom-action="customAction"></file-upload>
```
```js
async function customAction(file, component) {
// return component.uploadPut(file)
return component.uploadHtml4(file)
}
```
### headers
@ -1445,4 +1470,4 @@ Per second upload speed
* **Default:** `undefined`
* **Browser:** `= IE9`
* **Browser:** `= IE9`

@ -297,6 +297,29 @@ input标签的 `name` 属性
### custom-action
自定义上传方法
* **类型:** `async Function`
* **默认值:** `undefined`
* **详细:**
`custom-action` 优先级高于 `put-action, post-action`
* **示例:**
```html
<file-upload :custom-action="customAction"></file-upload>
```
```js
async function customAction(file, component) {
// return component.uploadPut(file)
return component.uploadHtml4(file)
}
```
### headers

Loading…
Cancel
Save