mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-03 12:48:45 +08:00
fix upload docs typo bug
This commit is contained in:
parent
c576d5720a
commit
fdac5519d2
@ -55,7 +55,7 @@
|
||||
submitUpload() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
handleAvatarScucess(res, file) {
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
@ -123,7 +123,7 @@ Use `before-upload` hook to limit the upload file format and size.
|
||||
class="avatar-uploader"
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarScucess"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload">
|
||||
<img v-if="imageUrl" :src="imageUrl" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
@ -163,7 +163,7 @@ Use `before-upload` hook to limit the upload file format and size.
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleAvatarScucess(res, file) {
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
@ -308,7 +308,7 @@ You can drag your file to a certain area to upload it.
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:file-list="fileList"
|
||||
mutiple>
|
||||
multiple>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">Drop file here or <em>click to upload</em></div>
|
||||
<div class="el-upload__tip" slot="tip">jpg/png files with a size less than 500kb</div>
|
||||
|
@ -95,7 +95,7 @@
|
||||
submitUpload() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
handleAvatarScucess(res, file) {
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
@ -164,7 +164,7 @@
|
||||
class="avatar-uploader"
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarScucess"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload">
|
||||
<img v-if="imageUrl" :src="imageUrl" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
@ -204,7 +204,7 @@
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleAvatarScucess(res, file) {
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
@ -344,7 +344,7 @@
|
||||
class="upload-demo"
|
||||
drag
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
mutiple>
|
||||
multiple>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div>
|
||||
|
@ -65,10 +65,8 @@ export default {
|
||||
if (postFiles.length === 0) { return; }
|
||||
|
||||
postFiles.forEach(rawFile => {
|
||||
if (!this.thumbnailMode || this.isImage(rawFile.type)) {
|
||||
this.onStart(rawFile);
|
||||
if (this.autoUpload) this.upload(rawFile);
|
||||
}
|
||||
this.onStart(rawFile);
|
||||
if (this.autoUpload) this.upload(rawFile);
|
||||
});
|
||||
},
|
||||
upload(rawFile, file) {
|
||||
|
Loading…
Reference in New Issue
Block a user