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
538e2934
Commit
538e2934
authored
Aug 29, 2016
by
baiyaaaaa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update form docs
parent
57b33a3e
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
344 additions
and
558 deletions
+344
-558
examples/docs/form.md
examples/docs/form.md
+311
-532
packages/date-picker/src/picker.vue
packages/date-picker/src/picker.vue
+7
-0
packages/form/package.json
packages/form/package.json
+1
-1
packages/form/src/form.vue
packages/form/src/form.vue
+6
-5
packages/theme-default/src/form.css
packages/theme-default/src/form.css
+18
-19
packages/theme-default/src/switch.css
packages/theme-default/src/switch.css
+1
-1
No files found.
examples/docs/form.md
View file @
538e2934
This diff is collapsed.
Click to expand it.
packages/date-picker/src/picker.vue
View file @
538e2934
...
...
@@ -34,6 +34,7 @@ import Vue from 'vue';
import
Clickoutside
from
'
main/utils/clickoutside
'
;
import
{
merge
,
formatDate
,
parseDate
,
getWeekNumber
}
from
'
./util
'
;
import
Popper
from
'
main/utils/popper
'
;
import
emitter
from
'
main/mixins/emitter
'
;
const
FUNCTION_KEYS
=
[
13
,
16
,
17
,
18
,
19
,
20
,
27
,
33
,
34
,
35
,
36
,
37
,
38
,
39
,
40
];
const
RANGE_SEPARATOR
=
'
-
'
;
...
...
@@ -178,6 +179,8 @@ const TYPE_VALUE_RESOLVER_MAP = {
};
export
default
{
mixins
:
[
emitter
],
props
:
{
format
:
String
,
readonly
:
Boolean
,
...
...
@@ -200,6 +203,9 @@ export default {
watch
:
{
pickerVisible
(
val
)
{
val
===
true
?
this
.
showPicker
()
:
this
.
hidePicker
();
},
value
(
val
)
{
this
.
dispatch
(
'
form-item
'
,
'
el.form.change
'
);
}
},
...
...
@@ -284,6 +290,7 @@ export default {
handleBlur
()
{
this
.
$emit
(
'
blur
'
,
this
);
this
.
dispatch
(
'
form-item
'
,
'
el.form.blur
'
);
},
handleKeydown
(
event
)
{
...
...
packages/form/package.json
View file @
538e2934
...
...
@@ -12,6 +12,6 @@
"author"
:
"haiping.zeng<haiping.zeng@ele.me>"
,
"license"
:
"MIT"
,
"dependencies"
:
{
"async-validator"
:
"^1.6.
5
"
"async-validator"
:
"^1.6.
6
"
}
}
packages/form/src/form.vue
View file @
538e2934
<
template
>
<form
:class=
"[
type ? 'el-form-' + type : 'el-form
',
{ '
is-label-left': labelAlign === 'left'
}
<form
class=
"el-form"
:class=
"[
labelPosition ? 'el-form--label-' + labelPosition : '
',
{ '
el-form--inline': inline
}
]">
<slot></slot>
</form>
...
...
@@ -16,12 +16,13 @@
model
:
Object
,
rules
:
Object
,
type
:
String
,
label
Alig
n
:
String
,
label
Positio
n
:
String
,
labelWidth
:
String
,
labelSuffix
:
{
type
:
String
,
default
:
''
}
},
inline
:
Boolean
},
data
()
{
return
{
...
...
packages/theme-default/src/form.css
View file @
538e2934
...
...
@@ -3,11 +3,28 @@
@component-namespace
el
{
@b
form
{
@
when
label-left
{
@
m
label-left
{
&
.el-form-item__label
{
text-align
:
left
;
}
}
@m
label-top
{
&
.el-form-item__label
{
float
:
none
;
display
:
inline-block
;
padding
:
0
0
10px
0
;
}
}
@m
inline
{
&
.el-form-item
{
display
:
inline-block
;
margin-right
:
10px
;
>
*
{
vertical-align
:
top
;
}
}
}
}
@b
form-item
{
margin-bottom
:
22px
;
...
...
@@ -67,22 +84,4 @@
}
}
}
@b
form-inline
{
&
.el-form-item
{
display
:
inline-block
;
margin-right
:
10px
;
>
*
{
vertical-align
:
top
;
}
}
}
@b
form-stacked
{
&
.el-form-item__label
{
float
:
none
;
display
:
inline-block
;
padding
:
0
0
10px
0
;
}
}
}
packages/theme-default/src/switch.css
View file @
538e2934
...
...
@@ -72,7 +72,7 @@
border-radius
:
15px
;
transition
:
transform
.3s
;
size
:
16px
;
z-index
:
10
0
;
z-index
:
2
0
;
background-color
:
var
(
--color-white
);
}
}
...
...
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