From 586c2bb72b7834deac214b1d28c6688f8b3137ec Mon Sep 17 00:00:00 2001 From: git Date: Mon, 5 Feb 2018 11:41:01 +0900 Subject: [PATCH] add custom-action --- docs/docs/en.md | 27 ++++++++++++++++++++++++++- docs/docs/zh-cn.md | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/docs/docs/en.md b/docs/docs/en.md index d89a58d..111845d 100644 --- a/docs/docs/en.md +++ b/docs/docs/en.md @@ -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 + + ``` + ```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` \ No newline at end of file +* **Browser:** `= IE9` diff --git a/docs/docs/zh-cn.md b/docs/docs/zh-cn.md index fdbe047..787ac3f 100644 --- a/docs/docs/zh-cn.md +++ b/docs/docs/zh-cn.md @@ -297,6 +297,29 @@ input标签的 `name` 属性 +### custom-action + +自定义上传方法 + +* **类型:** `async Function` + +* **默认值:** `undefined` + +* **详细:** + + `custom-action` 优先级高于 `put-action, post-action` + +* **示例:** + ```html + + ``` + ```js + async function customAction(file, component) { + // return component.uploadPut(file) + return component.uploadHtml4(file) + } + ``` + ### headers