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
5c01a654
Commit
5c01a654
authored
Jan 22, 2017
by
baiyaaaaa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add size docs
parent
fc4fd4cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
5 deletions
+88
-5
examples/docs/zh-CN/cascader.md
examples/docs/zh-CN/cascader.md
+67
-0
packages/cascader/src/main.vue
packages/cascader/src/main.vue
+4
-3
packages/theme-default/src/cascader.css
packages/theme-default/src/cascader.css
+17
-2
No files found.
examples/docs/zh-CN/cascader.md
View file @
5c01a654
...
...
@@ -81,6 +81,12 @@
width: 222px;
}
}
.demo-cascader-size {
.el-cascader {
vertical-align: top;
margin-right: 15px;
}
}
</style>
## 级联选择
...
...
@@ -247,6 +253,67 @@
```
:::
### 尺寸
:::demo 提供三种尺寸的级联选择器
```
html
<div
class=
"demo-cascader-size"
>
<el-cascader
placeholder=
"请选择"
:options=
"options"
size=
"large"
></el-cascader>
<el-cascader
placeholder=
"请选择"
:options=
"options"
></el-cascader>
<el-cascader
placeholder=
"请选择"
:options=
"options"
size=
"small"
></el-cascader>
</div>
<script>
module
.
exports
=
{
data
()
{
return
{
options
:
[{
value
:
'
zhejiang
'
,
label
:
'
Zhejiang
'
,
children
:
[{
value
:
'
hangzhou
'
,
label
:
'
Hangzhou
'
,
children
:
[{
value
:
'
xihu
'
,
label
:
'
West Lake
'
,
}],
},
{
value
:
'
ningbo
'
,
label
:
'
NingBo
'
,
children
:
[{
value
:
'
jiangbei
'
,
label
:
'
Jiang Bei
'
,
}],
}],
},
{
value
:
'
jiangsu
'
,
label
:
'
Jiangsu
'
,
children
:
[{
value
:
'
nanjing
'
,
label
:
'
Nanjing
'
,
children
:
[{
value
:
'
zhonghuamen
'
,
label
:
'
Zhong Hua Men
'
,
}],
}],
}]
};
}
};
</script>
```
:::
### 移入展开
在鼠标移入时就展开下级菜单,完成选择仍需要进行点击。
...
...
packages/cascader/src/main.vue
View file @
5c01a654
<
template
>
<span
class=
"el-cascader"
:class=
"
{
'is-opened': menuVisible
}"
:class=
"[
{ 'is-opened': menuVisible },
size ? 'el-cascader--' + size : ''
]"
@click="menuVisible = !menuVisible"
@mouseenter="inputHover = true"
@mouseleave="inputHover = false"
...
...
packages/theme-default/src/cascader.css
View file @
5c01a654
...
...
@@ -33,8 +33,8 @@
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
var
(
--input-height
)
;
line-height
:
@
height
;
height
:
100%
;
line-height
:
34px
;
padding
:
0
15px
0
10px
;
color
:
var
(
--input-color
);
width
:
100%
;
...
...
@@ -44,6 +44,21 @@
box-sizing
:
border-box
;
cursor
:
pointer
;
}
@m
large
{
font-size
:
var
(
--input-large-font-size
);
.el-cascader__label
{
line-height
:
calc
(
var
(
--input-large-height
)
-
2
);
}
}
@m
small
{
font-size
:
var
(
--input-small-font-size
);
.el-cascader__label
{
line-height
:
calc
(
var
(
--input-small-height
)
-
2
);
}
}
}
@b
cascader-menus
{
...
...
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