Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
front-end-dev
techbook
Commits
728307f8
Commit
728307f8
authored
Jan 13, 2020
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
裁剪
parent
d076eb95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
24 deletions
+25
-24
uploadCmpt.vue
src/components/common/uploadCmpt.vue
+22
-21
language.js
src/components/vue-image-crop-upload/utils/language.js
+3
-3
No files found.
src/components/common/uploadCmpt.vue
View file @
728307f8
<
template
>
<div>
<div
:class=
"this.$i18n.locale=='zh-CN'?'uploadCmptZh':'uploadCmptEn'"
>
<img
:src=
"imgDataUrl"
width=
"130"
height=
"130"
v-if=
'this.imgDataUrl!=""'
/>
<div
:class=
"this.$i18n.locale=='zh-CN'?'uploadCmptZh':'uploadCmptEn'"
v-if=
"!imgDataUrl"
>
<img
:src=
"imgDataUrl"
width=
"129"
height=
"129"
v-if=
'this.imgDataUrl!=""'
/>
<a
class=
"uploadClick"
@
click=
"toggleShow"
></a>
</div>
<div
class=
"imgDataUrl"
v-if=
"imgDataUrl"
>
<img
:src=
"imgDataUrl"
width=
"128"
height=
"128"
v-if=
'this.imgDataUrl!=""'
/>
<a
class=
"uploadClick"
@
click=
"toggleShow"
></a>
</div>
<my-upload
field=
"fileUpload"
...
...
@@ -10,10 +14,10 @@
@
crop-upload-success=
"cropUploadSuccess"
@
crop-upload-fail=
"cropUploadFail"
v-model=
"show"
:width=
"1
30
"
:width=
"1
28
"
:maxSize=
"2"
ref=
"uploadCmpt"
:height=
"1
30
"
:height=
"1
28
"
:params=
"params"
:noRotate=
'false'
:url=
"upload_Url"
...
...
@@ -110,42 +114,39 @@
<
style
scoped=
"scoped"
lang=
"scss"
>
.uploadCmptZh
{
position
:
relative
;
width
:
1
30
px
;
height
:
1
30
px
;
width
:
1
28
px
;
height
:
1
28
px
;
background
:
url(../../assets/img/uploadZh.png)
no-repeat
;
background-size
:
cover
;
border-radius
:
6px
;
img
{
border
:
1px
solid
#c0ccda
;
border-radius
:
6px
;
}
&
:hover
{
border
:
1px
dashed
#5d78ff
;
background-size
:
10
5
%
;
background-size
:
10
2
%
;
background-position
:
center
;
}
}
.uploadCmptEn
{
position
:
relative
;
width
:
1
30
px
;
height
:
1
30
px
;
width
:
1
28
px
;
height
:
1
28
px
;
background
:
url(../../assets/img/uploadEn.png)
no-repeat
;
background-size
:
cover
;
border-radius
:
6px
;
&
:hover
{
border
:
1px
dashed
#5d78ff
;
background-size
:
102%
;
background-position
:
center
;
}
}
.imgDataUrl
{
img
{
border
:
1px
solid
#c0ccda
;
border-radius
:
6px
;
}
&
:hover
{
border
:
1px
dashed
#5d78ff
;
}
}
.uploadClick
{
width
:
1
30
px
;
height
:
1
30
px
;
width
:
1
28
px
;
height
:
1
28
px
;
display
:
block
;
overflow
:
hidden
;
position
:
absolute
;
...
...
src/components/vue-image-crop-upload/utils/language.js
View file @
728307f8
...
...
@@ -5,7 +5,7 @@ export default {
noSupported
:
'浏览器不支持该功能,请使用IE10以上或其他现在浏览器!'
,
success
:
'上传成功'
,
fail
:
'图片上传失败'
,
preview
:
'
头像
预览'
,
preview
:
'
图片
预览'
,
btn
:
{
off
:
'取消'
,
close
:
'关闭'
,
...
...
@@ -14,7 +14,7 @@ export default {
},
error
:
{
onlyImg
:
'仅限图片格式'
,
outOfSize
:
'单
文件
大小不能超过 '
,
outOfSize
:
'单
图片
大小不能超过 '
,
lowestPx
:
'图片最低像素为(宽*高):'
}
},
...
...
@@ -38,7 +38,7 @@ export default {
}
},
en
:
{
hint
:
'Click or drag the
fil
e here to upload'
,
hint
:
'Click or drag the
imag
e here to upload'
,
loading
:
'Uploading…'
,
noSupported
:
'Browser is not supported, please use IE10+ or other browsers'
,
success
:
'Upload success'
,
...
...
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