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
1e317a3c
Commit
1e317a3c
authored
Aug 19, 2016
by
Leopoldthecoder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add transition-group in select
parent
33b54f44
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
14 deletions
+26
-14
examples/icon.json
examples/icon.json
+1
-1
packages/rate/src/main.vue
packages/rate/src/main.vue
+1
-1
packages/select-dropdown/src/select-dropdown.vue
packages/select-dropdown/src/select-dropdown.vue
+3
-1
packages/select/src/select.vue
packages/select/src/select.vue
+21
-11
No files found.
examples/icon.json
View file @
1e317a3c
[
"search"
,
"share"
,
"setting"
,
"circle-cross"
,
"warning"
,
"information"
,
"circle-check"
,
"delete"
,
"d-arrow-left"
,
"d-arrow-right"
,
"picture"
,
"upload"
,
"menu"
,
"time"
,
"circle-close"
,
"arrow-down"
,
"arrow-up"
,
"arrow-right"
,
"arrow-left"
,
"close"
,
"document"
,
"d-caret"
,
"date"
,
"message"
,
"loading"
,
"ellipsis"
,
"plus"
,
"caret-left"
,
"caret-right"
,
"caret-bottom"
,
"edit"
,
"caret-top"
,
"check"
,
"minus"
,
"star-on"
,
"star-off"
]
[
"search"
,
"share"
,
"setting"
,
"circle-cross"
,
"warning"
,
"information"
,
"circle-check"
,
"delete"
,
"d-arrow-left"
,
"d-arrow-right"
,
"picture"
,
"upload"
,
"menu"
,
"time"
,
"circle-close"
,
"arrow-down"
,
"arrow-up"
,
"arrow-right"
,
"arrow-left"
,
"close"
,
"document"
,
"d-caret"
,
"date"
,
"message"
,
"loading"
,
"ellipsis"
,
"plus"
,
"caret-left"
,
"caret-right"
,
"caret-bottom"
,
"edit"
,
"caret-top"
,
"check"
,
"minus"
,
"star-off"
,
"star-on"
]
\ No newline at end of file
\ No newline at end of file
packages/rate/src/main.vue
View file @
1e317a3c
...
@@ -195,7 +195,7 @@
...
@@ -195,7 +195,7 @@
showDecimalIcon
(
item
)
{
showDecimalIcon
(
item
)
{
let
showWhenDisabled
=
this
.
disabled
&&
this
.
valueDecimal
>
0
&&
item
-
1
<
this
.
value
&&
item
>
this
.
value
;
let
showWhenDisabled
=
this
.
disabled
&&
this
.
valueDecimal
>
0
&&
item
-
1
<
this
.
value
&&
item
>
this
.
value
;
let
showWhenAllowHalf
=
this
.
allowHalf
&&
this
.
pointerAtLeftHalf
&&
((
item
-
0.5
).
to
String
()
===
this
.
currentValue
.
toString
(
));
let
showWhenAllowHalf
=
this
.
allowHalf
&&
this
.
pointerAtLeftHalf
&&
((
item
-
0.5
).
to
Fixed
(
1
)
===
this
.
currentValue
.
toFixed
(
1
));
return
showWhenDisabled
||
showWhenAllowHalf
;
return
showWhenDisabled
||
showWhenAllowHalf
;
},
},
...
...
packages/select-dropdown/src/select-dropdown.vue
View file @
1e317a3c
...
@@ -26,7 +26,9 @@
...
@@ -26,7 +26,9 @@
methods
:
{
methods
:
{
updatePopper
()
{
updatePopper
()
{
if
(
this
.
popper
)
{
if
(
this
.
popper
)
{
this
.
popper
.
update
();
this
.
$nextTick
(()
=>
{
this
.
popper
.
update
();
});
}
else
{
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
popper
=
new
Popper
(
this
.
$parent
.
$refs
.
reference
.
$el
,
this
.
$el
,
{
this
.
popper
=
new
Popper
(
this
.
$parent
.
$refs
.
reference
.
$el
,
this
.
$el
,
{
...
...
packages/select/src/select.vue
View file @
1e317a3c
<
template
>
<
template
>
<div
class=
"el-select"
:class=
"
{ 'is-multiple': multiple, 'is-small': size === 'small' }">
<div
class=
"el-select"
:class=
"
{ 'is-multiple': multiple, 'is-small': size === 'small' }">
<div
class=
"el-select__tags"
v-if=
"multiple"
@
click.stop=
"toggleMenu"
ref=
"tags"
:style=
"
{ 'max-width': inputWidth - 36 + 'px' }">
<div
class=
"el-select__tags"
v-if=
"multiple"
@
click.stop=
"toggleMenu"
ref=
"tags"
:style=
"
{ 'max-width': inputWidth - 36 + 'px' }">
<el-tag
<transition-group
@
after-leave=
"resetInputHeight"
>
v-for=
"item in selected"
<el-tag
closable
v-for=
"item in selected"
:hit=
"item.hitState"
:key=
"item"
type=
"primary"
closable
@
click.native=
"deleteTag($event, item)"
:hit=
"item.hitState"
close-transition
>
{{
item
.
label
}}
</el-tag>
type=
"primary"
@
click.native=
"deleteTag($event, item)"
close-transition
>
{{
item
.
label
}}
</el-tag>
</transition-group>
<input
<input
type=
"text"
type=
"text"
class=
"el-select__input"
class=
"el-select__input"
...
@@ -42,7 +44,7 @@
...
@@ -42,7 +44,7 @@
@
keydown.native.tab=
"visible = false"
@
keydown.native.tab=
"visible = false"
@
mouseenter.native=
"inputHovering = true"
@
mouseenter.native=
"inputHovering = true"
@
mouseleave.native=
"inputHovering = false"
@
mouseleave.native=
"inputHovering = false"
:icon=
"
showCloseIcon ? 'circle-close' : 'caret-top'
"
:icon=
"
iconClass
"
:style=
"
{ 'width': inputWidth + 'px' }"
:style=
"
{ 'width': inputWidth + 'px' }"
v-element-clickoutside="handleClose">
v-element-clickoutside="handleClose">
</el-input>
</el-input>
...
@@ -76,6 +78,10 @@
...
@@ -76,6 +78,10 @@
componentName
:
'
select
'
,
componentName
:
'
select
'
,
computed
:
{
computed
:
{
iconClass
()
{
return
this
.
showCloseIcon
?
'
circle-close
'
:
(
this
.
remote
&&
this
.
filterable
?
''
:
'
caret-top
'
);
},
debounce
()
{
debounce
()
{
return
this
.
remote
?
300
:
0
;
return
this
.
remote
?
300
:
0
;
},
},
...
@@ -280,7 +286,9 @@
...
@@ -280,7 +286,9 @@
visible
(
val
)
{
visible
(
val
)
{
if
(
!
val
)
{
if
(
!
val
)
{
this
.
$refs
.
reference
.
$el
.
querySelector
(
'
input
'
).
blur
();
this
.
$refs
.
reference
.
$el
.
querySelector
(
'
input
'
).
blur
();
this
.
$el
.
querySelector
(
'
.el-input__icon
'
).
classList
.
remove
(
'
is-reverse
'
);
if
(
this
.
$el
.
querySelector
(
'
.el-input__icon
'
))
{
this
.
$el
.
querySelector
(
'
.el-input__icon
'
).
classList
.
remove
(
'
is-reverse
'
);
}
this
.
broadcast
(
'
select-dropdown
'
,
'
destroyPopper
'
);
this
.
broadcast
(
'
select-dropdown
'
,
'
destroyPopper
'
);
if
(
this
.
$refs
.
input
)
{
if
(
this
.
$refs
.
input
)
{
this
.
$refs
.
input
.
blur
();
this
.
$refs
.
input
.
blur
();
...
@@ -301,7 +309,9 @@
...
@@ -301,7 +309,9 @@
if
(
this
.
remote
)
{
if
(
this
.
remote
)
{
this
.
voidRemoteQuery
=
true
;
this
.
voidRemoteQuery
=
true
;
}
}
this
.
$el
.
querySelector
(
'
.el-input__icon
'
).
classList
.
add
(
'
is-reverse
'
);
if
(
this
.
$el
.
querySelector
(
'
.el-input__icon
'
))
{
this
.
$el
.
querySelector
(
'
.el-input__icon
'
).
classList
.
add
(
'
is-reverse
'
);
}
this
.
broadcast
(
'
select-dropdown
'
,
'
updatePopper
'
);
this
.
broadcast
(
'
select-dropdown
'
,
'
updatePopper
'
);
if
(
this
.
filterable
)
{
if
(
this
.
filterable
)
{
this
.
query
=
this
.
selectedLabel
;
this
.
query
=
this
.
selectedLabel
;
...
...
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