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
fdac5519
Commit
fdac5519
authored
Mar 20, 2017
by
baiyaaaaa
Committed by
杨奕
Mar 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix upload docs typo bug
parent
c576d572
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
examples/docs/en-US/upload.md
examples/docs/en-US/upload.md
+4
-4
examples/docs/zh-CN/upload.md
examples/docs/zh-CN/upload.md
+4
-4
packages/upload/src/upload.vue
packages/upload/src/upload.vue
+2
-4
No files found.
examples/docs/en-US/upload.md
View file @
fdac5519
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
submitUpload() {
submitUpload() {
this.$refs.upload.submit();
this.$refs.upload.submit();
},
},
handleAvatarS
cu
cess(res, file) {
handleAvatarS
uc
cess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw);
this.imageUrl = URL.createObjectURL(file.raw);
},
},
beforeAvatarUpload(file) {
beforeAvatarUpload(file) {
...
@@ -123,7 +123,7 @@ Use `before-upload` hook to limit the upload file format and size.
...
@@ -123,7 +123,7 @@ Use `before-upload` hook to limit the upload file format and size.
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"https://jsonplaceholder.typicode.com/posts/"
action=
"https://jsonplaceholder.typicode.com/posts/"
:show-file-list=
"false"
:show-file-list=
"false"
:on-success=
"handleAvatarS
cu
cess"
:on-success=
"handleAvatarS
uc
cess"
:before-upload=
"beforeAvatarUpload"
>
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
<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.
...
@@ -163,7 +163,7 @@ Use `before-upload` hook to limit the upload file format and size.
};
};
},
},
methods
:
{
methods
:
{
handleAvatarS
cu
cess
(
res
,
file
)
{
handleAvatarS
uc
cess
(
res
,
file
)
{
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
},
},
beforeAvatarUpload
(
file
)
{
beforeAvatarUpload
(
file
)
{
...
@@ -308,7 +308,7 @@ You can drag your file to a certain area to upload it.
...
@@ -308,7 +308,7 @@ You can drag your file to a certain area to upload it.
:on-preview=
"handlePreview"
:on-preview=
"handlePreview"
:on-remove=
"handleRemove"
:on-remove=
"handleRemove"
:file-list=
"fileList"
:file-list=
"fileList"
mutiple
>
mu
l
tiple
>
<i
class=
"el-icon-upload"
></i>
<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__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>
<div
class=
"el-upload__tip"
slot=
"tip"
>
jpg/png files with a size less than 500kb
</div>
...
...
examples/docs/zh-CN/upload.md
View file @
fdac5519
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
submitUpload() {
submitUpload() {
this.$refs.upload.submit();
this.$refs.upload.submit();
},
},
handleAvatarS
cu
cess(res, file) {
handleAvatarS
uc
cess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw);
this.imageUrl = URL.createObjectURL(file.raw);
},
},
beforeAvatarUpload(file) {
beforeAvatarUpload(file) {
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"https://jsonplaceholder.typicode.com/posts/"
action=
"https://jsonplaceholder.typicode.com/posts/"
:show-file-list=
"false"
:show-file-list=
"false"
:on-success=
"handleAvatarS
cu
cess"
:on-success=
"handleAvatarS
uc
cess"
:before-upload=
"beforeAvatarUpload"
>
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
...
@@ -204,7 +204,7 @@
...
@@ -204,7 +204,7 @@
};
};
},
},
methods
:
{
methods
:
{
handleAvatarS
cu
cess
(
res
,
file
)
{
handleAvatarS
uc
cess
(
res
,
file
)
{
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
},
},
beforeAvatarUpload
(
file
)
{
beforeAvatarUpload
(
file
)
{
...
@@ -344,7 +344,7 @@
...
@@ -344,7 +344,7 @@
class=
"upload-demo"
class=
"upload-demo"
drag
drag
action=
"https://jsonplaceholder.typicode.com/posts/"
action=
"https://jsonplaceholder.typicode.com/posts/"
mutiple
>
mu
l
tiple
>
<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>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传jpg/png文件,且不超过500kb
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传jpg/png文件,且不超过500kb
</div>
...
...
packages/upload/src/upload.vue
View file @
fdac5519
...
@@ -65,10 +65,8 @@ export default {
...
@@ -65,10 +65,8 @@ export default {
if
(
postFiles
.
length
===
0
)
{
return
;
}
if
(
postFiles
.
length
===
0
)
{
return
;
}
postFiles
.
forEach
(
rawFile
=>
{
postFiles
.
forEach
(
rawFile
=>
{
if
(
!
this
.
thumbnailMode
||
this
.
isImage
(
rawFile
.
type
))
{
this
.
onStart
(
rawFile
);
this
.
onStart
(
rawFile
);
if
(
this
.
autoUpload
)
this
.
upload
(
rawFile
);
if
(
this
.
autoUpload
)
this
.
upload
(
rawFile
);
}
});
});
},
},
upload
(
rawFile
,
file
)
{
upload
(
rawFile
,
file
)
{
...
...
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