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
09cb7049
Commit
09cb7049
authored
Apr 28, 2017
by
baiyaaaaa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix preview when auto-upload is false
parent
fff7dddd
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
274 additions
and
266 deletions
+274
-266
packages/theme-default/src/common/transition.css
packages/theme-default/src/common/transition.css
+10
-0
packages/theme-default/src/upload.css
packages/theme-default/src/upload.css
+18
-10
packages/upload/src/upload-list.vue
packages/upload/src/upload-list.vue
+11
-20
yarn.lock
yarn.lock
+235
-236
No files found.
packages/theme-default/src/common/transition.css
View file @
09cb7049
@charset
"UTF-8"
;
@charset
"UTF-8"
;
@import
'./var.css'
;
@import
'./var.css'
;
/* DEPRECATED */
/* DEPRECATED */
.fade-in-linear-enter-active
,
.fade-in-linear-enter-active
,
.fade-in-linear-leave-active
{
.fade-in-linear-leave-active
{
...
@@ -70,3 +71,12 @@
...
@@ -70,3 +71,12 @@
.collapse-transition
{
.collapse-transition
{
transition
:
0.3s
height
ease-in-out
,
0.3s
padding-top
ease-in-out
,
0.3s
padding-bottom
ease-in-out
;
transition
:
0.3s
height
ease-in-out
,
0.3s
padding-top
ease-in-out
,
0.3s
padding-bottom
ease-in-out
;
}
}
.el-list-enter-active
,
.el-list-leave-active
{
transition
:
all
1s
;
}
.el-list-enter
,
.el-list-leave-active
{
opacity
:
0
;
transform
:
translateY
(
-30px
);
}
\ No newline at end of file
packages/theme-default/src/upload.css
View file @
09cb7049
...
@@ -129,16 +129,19 @@
...
@@ -129,16 +129,19 @@
&
:first-child
{
&
:first-child
{
margin-top
:
10px
;
margin-top
:
10px
;
}
}
&
.el-icon-check
,
&
.el-icon-upload-success
{
&
.el-icon-circle-check
{
color
:
var
(
--color-success
);
color
:
var
(
--color-success
);
}
}
&
.el-icon-close
{
&
.el-icon-close
{
display
:
none
;
display
:
none
;
position
:
absolute
;
top
:
5px
;
right
:
5px
;
cursor
:
pointer
;
cursor
:
pointer
;
opacity
:
.75
;
opacity
:
.75
;
transform
:
scale
(
.7
);
color
:
var
(
--color-extra-light-black
);
color
:
var
(
--color-extra-light-black
);
transform
:
scale
(
.7
);
&:hover
{
&:hover
{
opacity
:
1
;
opacity
:
1
;
}
}
...
@@ -151,13 +154,15 @@
...
@@ -151,13 +154,15 @@
}
}
}
}
@when
success
{
@when
success
{
.el-upload-list__item-status-label
{
display
:
block
;
}
.el-upload-list__item-name
:hover
{
.el-upload-list__item-name
:hover
{
color
:
var
(
--link-hover-color
);
color
:
var
(
--link-hover-color
);
cursor
:
pointer
;
cursor
:
pointer
;
}
}
&
:hover
{
&
:hover
{
.el-icon-circle-check,
.el-upload-list__item-status-label
{
.el-icon-check
{
display
:
none
;
display
:
none
;
}
}
}
}
...
@@ -182,9 +187,10 @@
...
@@ -182,9 +187,10 @@
}
}
@e
item-status-label
{
@e
item-status-label
{
position
:
absolute
;
position
:
absolute
;
right
:
10
px
;
right
:
5
px
;
top
:
0
;
top
:
0
;
line-height
:
inherit
;
line-height
:
inherit
;
display
:
none
;
}
}
@e
item-delete
{
@e
item-delete
{
position
:
absolute
;
position
:
absolute
;
...
@@ -219,6 +225,10 @@
...
@@ -219,6 +225,10 @@
color
:
var
(
--color-white
);
color
:
var
(
--color-white
);
}
}
&
.el-icon-close
{
display
:
none
;
}
&
:hover
.el-upload-list__item-status-label
{
&
:hover
.el-upload-list__item-status-label
{
display
:
none
;
display
:
none
;
}
}
...
@@ -316,10 +326,6 @@
...
@@ -316,10 +326,6 @@
box-shadow
:
none
;
box-shadow
:
none
;
top
:
-2px
;
top
:
-2px
;
right
:
-12px
;
right
:
-12px
;
.el-icon-close
{
transform
:
rotate
(
45deg
)
scale
(
.7
);
}
}
}
}
}
&
.is-success
{
&
.is-success
{
...
@@ -339,6 +345,8 @@
...
@@ -339,6 +345,8 @@
width
:
70px
;
width
:
70px
;
height
:
70px
;
height
:
70px
;
float
:
left
;
float
:
left
;
position
:
relative
;
z-index
:
1
;
margin-left
:
-80px
;
margin-left
:
-80px
;
}
}
.el-upload-list__item-name
{
.el-upload-list__item-name
{
...
...
packages/upload/src/upload-list.vue
View file @
09cb7049
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<transition-group
<transition-group
tag=
"ul"
tag=
"ul"
:class=
"['el-upload-list', 'el-upload-list--' + listType]"
:class=
"['el-upload-list', 'el-upload-list--' + listType]"
name=
"list"
name=
"
el-
list"
>
>
<li
<li
v-for=
"file in files"
v-for=
"file in files"
...
@@ -11,34 +11,25 @@
...
@@ -11,34 +11,25 @@
>
>
<img
<img
class=
"el-upload-list__item-thumbnail"
class=
"el-upload-list__item-thumbnail"
v-if=
"
['picture-card', 'picture'].indexOf(listType) > -1 && file.status === 'success'
"
v-if=
"
file.status !== 'uploading' && ['picture-card', 'picture'].indexOf(listType) > -1
"
:src=
"file.url"
alt=
""
:src=
"file.url"
alt=
""
>
>
<a
class=
"el-upload-list__item-name"
@
click=
"handleClick(file)"
>
<a
class=
"el-upload-list__item-name"
@
click=
"handleClick(file)"
>
<i
class=
"el-icon-document"
></i>
{{
file
.
name
}}
<i
class=
"el-icon-document"
></i>
{{
file
.
name
}}
</a>
</a>
<label
class=
"el-upload-list__item-status-label"
>
<label
class=
"el-upload-list__item-status-label"
>
<i
v-if=
"file.status === 'success'"
<i
:class=
"
{
:class=
"
{
'el-icon-upload-success': true,
'el-icon-circle-check': listType === 'text',
'el-icon-circle-check': listType === 'text',
'el-icon-check': ['picture-card', 'picture'].indexOf(listType) > -1
'el-icon-check': ['picture-card', 'picture'].indexOf(listType) > -1
}">
}">
</i>
</i>
<i
class=
"el-icon-close"
@
click=
"$emit('remove', file)"
></i>
</label>
</label>
<span
class=
"el-upload-list__item-actions"
<i
class=
"el-icon-close"
@
click=
"$emit('remove', file)"
></i>
v-if=
"
<span
class=
"el-upload-list__item-actions"
v-if=
"listType === 'picture-card'"
>
listType === 'picture-card' &&
file.status === 'success'
"
>
<span
<span
v-if=
"
handlePreview &&
listType === 'picture-card'
"
@
click=
"handlePreview(file)"
class=
"el-upload-list__item-preview"
class=
"el-upload-list__item-preview"
v-if=
"handlePreview && listType === 'picture-card'"
@
click=
"handlePreview(file)"
>
>
<i
class=
"el-icon-view"
></i>
<i
class=
"el-icon-view"
></i>
</span>
</span>
...
...
yarn.lock
View file @
09cb7049
This diff is collapsed.
Click to expand it.
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