Commit 87fc927b authored by cinwell.li's avatar cinwell.li Committed by baiyaaaaa

Upload(doc): fix api (#3177)

parent df46ca5c
...@@ -86,7 +86,7 @@ Upload files by clicking or drag-and-drop ...@@ -86,7 +86,7 @@ Upload files by clicking or drag-and-drop
```html ```html
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-preview="handlePreview"
:on-remove="handleRemove" :on-remove="handleRemove"
:file-list="fileList"> :file-list="fileList">
...@@ -121,7 +121,7 @@ Use `before-upload` hook to limit the upload file format and size. ...@@ -121,7 +121,7 @@ Use `before-upload` hook to limit the upload file format and size.
```html ```html
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false" :show-file-list="false"
:on-success="handleAvatarScucess" :on-success="handleAvatarScucess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
...@@ -191,7 +191,7 @@ Use `list-type` to change the fileList style. ...@@ -191,7 +191,7 @@ Use `list-type` to change the fileList style.
::: demo ::: demo
```html ```html
<el-upload <el-upload
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card" list-type="picture-card"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:on-remove="handleRemove"> :on-remove="handleRemove">
...@@ -228,7 +228,7 @@ Use `list-type` to change the fileList style. ...@@ -228,7 +228,7 @@ Use `list-type` to change the fileList style.
```html ```html
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-preview="handlePreview"
:on-remove="handleRemove" :on-remove="handleRemove"
:file-list="fileList2" :file-list="fileList2"
...@@ -264,7 +264,7 @@ Use `on-change` hook function to control upload file list ...@@ -264,7 +264,7 @@ Use `on-change` hook function to control upload file list
```html ```html
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:on-change="handleChange" :on-change="handleChange"
:file-list="fileList3"> :file-list="fileList3">
<el-button size="small" type="primary">Click to upload</el-button> <el-button size="small" type="primary">Click to upload</el-button>
...@@ -304,7 +304,7 @@ You can drag your file to a certain area to upload it. ...@@ -304,7 +304,7 @@ You can drag your file to a certain area to upload it.
<el-upload <el-upload
class="upload-demo" class="upload-demo"
drag drag
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-preview="handlePreview"
:on-remove="handleRemove" :on-remove="handleRemove"
:file-list="fileList" :file-list="fileList"
...@@ -323,7 +323,7 @@ You can drag your file to a certain area to upload it. ...@@ -323,7 +323,7 @@ You can drag your file to a certain area to upload it.
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="upload" ref="upload"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:auto-upload="false"> :auto-upload="false">
<el-button slot="trigger" size="small" type="primary">select file</el-button> <el-button slot="trigger" size="small" type="primary">select file</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">upload to server</el-button> <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">upload to server</el-button>
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
```html ```html
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-preview="handlePreview"
:on-remove="handleRemove" :on-remove="handleRemove"
:file-list="fileList"> :file-list="fileList">
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
```html ```html
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false" :show-file-list="false"
:on-success="handleAvatarScucess" :on-success="handleAvatarScucess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
::: demo ::: demo
```html ```html
<el-upload <el-upload
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card" list-type="picture-card"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:on-remove="handleRemove"> :on-remove="handleRemove">
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
```html ```html
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-preview="handlePreview"
:on-remove="handleRemove" :on-remove="handleRemove"
:file-list="fileList2" :file-list="fileList2"
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
```html ```html
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:on-change="handleChange" :on-change="handleChange"
:file-list="fileList3"> :file-list="fileList3">
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
<el-upload <el-upload
class="upload-demo" class="upload-demo"
drag drag
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
mutiple> mutiple>
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
...@@ -359,7 +359,7 @@ ...@@ -359,7 +359,7 @@
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="upload" ref="upload"
action="//jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-preview="handlePreview"
:on-remove="handleRemove" :on-remove="handleRemove"
:file-list="fileList" :file-list="fileList"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment