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
6e31e615
Commit
6e31e615
authored
Sep 14, 2017
by
baiyaaaaa
Committed by
杨奕
Sep 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support success validate status
parent
5c17f579
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
69 additions
and
41 deletions
+69
-41
packages/date-picker/src/picker.vue
packages/date-picker/src/picker.vue
+1
-1
packages/form/src/form-item.vue
packages/form/src/form-item.vue
+6
-0
packages/input/src/input.vue
packages/input/src/input.vue
+21
-6
packages/select/src/select.vue
packages/select/src/select.vue
+1
-1
packages/theme-chalk/src/form.scss
packages/theme-chalk/src/form.scss
+23
-1
packages/theme-chalk/src/input.scss
packages/theme-chalk/src/input.scss
+13
-27
packages/theme-chalk/src/select.scss
packages/theme-chalk/src/select.scss
+4
-5
No files found.
packages/date-picker/src/picker.vue
View file @
6e31e615
...
...
@@ -15,7 +15,7 @@
@
change.native=
"displayValue = $event.target.value"
:validateEvent=
"false"
ref=
"reference"
>
<i
slot=
"
icon
"
<i
slot=
"
suffix
"
class=
"el-input__icon"
@
click=
"handleClickIcon"
:class=
"[showClose ? 'el-icon-close' : triggerClass]"
...
...
packages/form/src/form-item.vue
View file @
6e31e615
...
...
@@ -52,6 +52,12 @@
mixins
:
[
emitter
],
provide
()
{
return
{
formItem
:
this
};
},
props
:
{
label
:
String
,
labelWidth
:
String
,
...
...
packages/input/src/input.vue
View file @
6e31e615
...
...
@@ -36,13 +36,19 @@
@
blur=
"handleBlur"
>
<!-- 后置内容 -->
<span
class=
"el-input__suffix"
v-if=
"$slots.suffix || suffixIcon"
>
<span
class=
"el-input__suffix"
v-if=
"$slots.suffix || suffixIcon || validateState"
>
<span
class=
"el-input__suffix-inner"
>
<slot
name=
"suffix"
></slot>
<i
class=
"el-input__icon"
v-if=
"suffixIcon"
:class=
"['el-icon-' + suffixIcon]"
>
</i>
</span>
<i
class=
"el-input__icon"
v-if=
"validateState"
:class=
"['el-input__validateIcon', validateIcon]"
>
</i>
</span>
<!-- 后置元素 -->
<div
class=
"el-input-group__append"
v-if=
"$slots.append"
>
<slot
name=
"append"
></slot>
...
...
@@ -74,6 +80,8 @@
mixins
:
[
emitter
,
Focus
(
'
input
'
)],
inject
:
[
'
formItem
'
],
data
()
{
return
{
currentValue
:
this
.
value
,
...
...
@@ -123,8 +131,15 @@
},
computed
:
{
validating
()
{
return
this
.
$parent
.
validateState
===
'
validating
'
;
validateState
()
{
return
this
.
formItem
?
this
.
formItem
.
validateState
:
''
;
},
validateIcon
()
{
return
{
validating
:
'
el-icon-loading
'
,
success
:
'
el-icon-circle-check
'
,
error
:
'
el-icon-circle-cross
'
}[
this
.
validateState
];
},
textareaStyle
()
{
return
merge
({},
this
.
textareaCalcStyle
,
{
resize
:
this
.
resize
});
...
...
packages/select/src/select.vue
View file @
6e31e615
...
...
@@ -65,7 +65,7 @@
@mouseenter.native="inputHovering = true"
@mouseleave.native="inputHovering = false">
<i
slot=
"suffix"
:class=
"['el-input__icon', 'el-icon-' + iconClass]"
:class=
"['el-
select__caret', 'el-
input__icon', 'el-icon-' + iconClass]"
@
click=
"handleIconClick"
></i>
</el-input>
...
...
packages/theme-chalk/src/form.scss
View file @
6e31e615
...
...
@@ -80,13 +80,35 @@
@include
when
(
error
)
{
&
.el-input__inner
,
&
.el-textarea__inner
{
&
:focus
{
border-color
:
$--color-danger
;
}
}
&
.el-input-group__append
,
&
.el-input-group__prepend
{
&
.el-input__inner
{
border-color
:
transparent
;
}
}
.el-input__validateIcon
{
color
:
$--color-danger
;
}
}
@include
when
(
success
)
{
&
.el-input__inner
,
&
.el-textarea__inner
{
&
,
&
:focus
{
border-color
:
$--color-success
;
}
}
&
.el-input-group__append
,
&
.el-input-group__prepend
{
&
.el-input__inner
{
border-color
:
transparent
;
}
}
.el-input__validateIcon
{
color
:
$--color-success
;
}
}
}
packages/theme-chalk/src/input.scss
View file @
6e31e615
...
...
@@ -41,48 +41,30 @@
@include
e
(
suffix
)
{
position
:
absolute
;
height
:
100%
;
right
:
0
;
right
:
5px
;
top
:
0
;
text-align
:
center
;
color
:
$--input-icon-color
;
transition
:
all
.3s
;
// @include when(clickable) {
// &:hover {
// cursor: pointer;
// color: $--input-hover-border;
// & + .el-input__inner {
// border-color: $--input-hover-border;
// }
// }
// }
pointer-events
:
none
;
}
@include
e
(
suffix-inner
)
{
pointer-events
:
all
;
}
@include
e
(
prefix
)
{
position
:
absolute
;
height
:
100%
;
left
:
0
;
left
:
5px
;
top
:
0
;
text-align
:
center
;
color
:
$--input-icon-color
;
transition
:
all
.3s
;
// @include when(clickable) {
// &:hover {
// cursor: pointer;
// color: $--input-hover-border;
// & + .el-input__inner {
// border-color: $--input-hover-border;
// }
// }
// }
}
@include
e
(
icon
)
{
height
:
100%
;
width
:
30
px
;
width
:
25
px
;
text-align
:
center
;
// color: $--input-icon-color;
transition
:
all
.3s
;
...
...
@@ -96,6 +78,10 @@
}
}
@include
e
(
validateIcon
)
{
pointer-events
:
none
;
}
@include
when
(
active
)
{
.el-input__inner
{
outline
:
none
;
...
...
@@ -121,12 +107,12 @@
}
@include
m
(
suffix
)
{
.el-input__inner
{
padding-right
:
30
px
;
padding-right
:
25
px
;
}
}
@include
m
(
prefix
)
{
.el-input__inner
{
padding-left
:
30
px
;
padding-left
:
25
px
;
}
}
@include
m
(
large
)
{
...
...
packages/theme-chalk/src/select.scss
View file @
6e31e615
...
...
@@ -27,13 +27,12 @@
}
&
.el-input
{
&
.el-
input__icon
{
&
.el-
select__caret
{
color
:
$--select-input-color
;
font-size
:
$--select-input-font-size
;
transition
:
transform
.3s
;
transform
:
rotateZ
(
180deg
);
line-height
:
16px
;
top
:
50%
;
cursor
:
pointer
;
@include
when
(
reverse
)
{
...
...
@@ -42,10 +41,10 @@
@include
when
(
show-close
)
{
transition
:
0s
;
height
:
16px
;
width
:
16px
;
//
height: 16px;
//
width: 16px;
font-size
:
$--select-font-size
;
right
:
8px
;
//
right: 8px;
text-align
:
center
;
transform
:
rotateZ
(
180deg
);
border-radius
:
$--border-radius-circle
;
...
...
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