Commit a28bc982af1164730d074209bc131ecbcbf2e2a5
1 parent
ddc35c9a
update Cascader style
Showing
3 changed files
with
46 additions
and
5 deletions
Show diff stats
examples/routers/cascader.vue
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | {{ v1 }} |
6 | 6 | </i-col> |
7 | 7 | <i-col span="4"> |
8 | - <Cascader :data="data3" filterable v-model="v1"></Cascader> | |
8 | + <Cascader :data="data2" filterable v-model="v1" style="width: 200px;"></Cascader> | |
9 | 9 | <!--<Cascader :data="data2" filterable v-model="v1" :loadData="loadData"></Cascader>--> |
10 | 10 | </i-col> |
11 | 11 | </Row> |
... | ... | @@ -28,10 +28,40 @@ |
28 | 28 | children: [{ |
29 | 29 | value: 'nanjing', |
30 | 30 | label: '南京', |
31 | - children: [{ | |
32 | - value: 'zhonghuamen', | |
33 | - label: '中华门' | |
34 | - }] | |
31 | + children: [ | |
32 | + { | |
33 | + value: 'zhonghuamen', | |
34 | + label: '中华门' | |
35 | + }, | |
36 | + { | |
37 | + value: 'v1', | |
38 | + label: 'v111' | |
39 | + }, | |
40 | + { | |
41 | + value: 'v2', | |
42 | + label: 'v2222' | |
43 | + }, | |
44 | + { | |
45 | + value: 'v3', | |
46 | + label: 'v333' | |
47 | + }, | |
48 | + { | |
49 | + value: 'v4', | |
50 | + label: 'v4444' | |
51 | + }, | |
52 | + { | |
53 | + value: 'v5', | |
54 | + label: 'v555' | |
55 | + }, | |
56 | + { | |
57 | + value: 'v6', | |
58 | + label: 'v666' | |
59 | + }, | |
60 | + { | |
61 | + value: 'v7', | |
62 | + label: 'v777' | |
63 | + } | |
64 | + ] | |
35 | 65 | }] |
36 | 66 | } |
37 | 67 | ], | ... | ... |
src/styles/components/cascader.less
... | ... | @@ -77,12 +77,20 @@ |
77 | 77 | |
78 | 78 | &-dropdown{ |
79 | 79 | padding: 5px 0; |
80 | + .@{select-dropdown-prefix-cls}-list{ | |
81 | + max-height: 190px; | |
82 | + box-sizing: border-box; | |
83 | + overflow: auto; | |
84 | + } | |
80 | 85 | } |
81 | 86 | |
82 | 87 | &-not-found-tip{ |
83 | 88 | padding: 5px 0; |
84 | 89 | text-align: center; |
85 | 90 | color: @btn-disable-color; |
91 | + li:not([class^=ivu-]){ | |
92 | + margin-bottom: 0; | |
93 | + } | |
86 | 94 | } |
87 | 95 | &-not-found .@{select-dropdown-prefix-cls} { |
88 | 96 | width: inherit; | ... | ... |
src/styles/components/select.less