Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
b3cad102
Commit
b3cad102
authored
Sep 09, 2016
by
杨奕
Committed by
GitHub
Sep 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #46 from QingWei-Li/fix/upload-doc
Upload: update doc
parents
fd0ac117
a2b361e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
examples/docs/upload.md
examples/docs/upload.md
+5
-3
No files found.
examples/docs/upload.md
View file @
b3cad102
...
@@ -45,7 +45,10 @@
...
@@ -45,7 +45,10 @@
::: demo 通过 slot 你可以传入自定义的上传按钮类型和文字提示。
::: demo 通过 slot 你可以传入自定义的上传按钮类型和文字提示。
```
html
```
html
<el-upload
action=
"http://127.0.0.1:9000/upload"
:on-preview=
"handlePreview"
:on-remove=
"handleRemove"
>
<el-upload
action=
"http://127.0.0.1:9000/upload"
:on-preview=
"handlePreview"
:on-remove=
"handleRemove"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传jpg/png文件,且不超过500kb
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传jpg/png文件,且不超过500kb
</div>
</el-upload>
</el-upload>
...
@@ -138,7 +141,7 @@
...
@@ -138,7 +141,7 @@
| headers | 可选参数, 设置上传的请求头部 | object | — | — |
| headers | 可选参数, 设置上传的请求头部 | object | — | — |
| multiple | 可选参数, 是否支持多选文件 | boolean | — | — |
| multiple | 可选参数, 是否支持多选文件 | boolean | — | — |
| file | 可选参数, 上传的文件字段名 | string | — | file |
| file | 可选参数, 上传的文件字段名 | string | — | file |
| with-credentials | 支持发送 cooki
ng
凭证信息 | boolean | — | false |
| with-credentials | 支持发送 cooki
e
凭证信息 | boolean | — | false |
| show-uploadList | 是否显示已上传文件列表 | boolean | — | true |
| show-uploadList | 是否显示已上传文件列表 | boolean | — | true |
| type | 上传控件类型 | string | select,drag | select |
| type | 上传控件类型 | string | select,drag | select |
| accept | 可选参数, 接受上传的
[
文件类型
](
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept
)
, 拖拽文件上传时不受此参数影响 | string | — | — |
| accept | 可选参数, 接受上传的
[
文件类型
](
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept
)
, 拖拽文件上传时不受此参数影响 | string | — | — |
...
@@ -148,4 +151,3 @@
...
@@ -148,4 +151,3 @@
| on-error | 可选参数, 文件上传失败时的钩子 | function(err, file, fileList) | — | — |
| on-error | 可选参数, 文件上传失败时的钩子 | function(err, file, fileList) | — | — |
| before-upload | 可选参数, 上传文件之前的钩子,参数为上传的文件,若返回 false 或者 Promise 则停止上传。 | function(file) | — | — |
| before-upload | 可选参数, 上传文件之前的钩子,参数为上传的文件,若返回 false 或者 Promise 则停止上传。 | function(file) | — | — |
| thumbnail-mode | 是否设置为图片模式,该模式下会显示图片缩略图 | boolean | — | false |
| thumbnail-mode | 是否设置为图片模式,该模式下会显示图片缩略图 | boolean | — | false |
| type | 上传控件类型 | string | select,drag | select |
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment