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,7 +5,7 @@ | ||
5 | {{ v1 }} | 5 | {{ v1 }} |
6 | </i-col> | 6 | </i-col> |
7 | <i-col span="4"> | 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 | <!--<Cascader :data="data2" filterable v-model="v1" :loadData="loadData"></Cascader>--> | 9 | <!--<Cascader :data="data2" filterable v-model="v1" :loadData="loadData"></Cascader>--> |
10 | </i-col> | 10 | </i-col> |
11 | </Row> | 11 | </Row> |
@@ -28,10 +28,40 @@ | @@ -28,10 +28,40 @@ | ||
28 | children: [{ | 28 | children: [{ |
29 | value: 'nanjing', | 29 | value: 'nanjing', |
30 | label: '南京', | 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,12 +77,20 @@ | ||
77 | 77 | ||
78 | &-dropdown{ | 78 | &-dropdown{ |
79 | padding: 5px 0; | 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 | &-not-found-tip{ | 87 | &-not-found-tip{ |
83 | padding: 5px 0; | 88 | padding: 5px 0; |
84 | text-align: center; | 89 | text-align: center; |
85 | color: @btn-disable-color; | 90 | color: @btn-disable-color; |
91 | + li:not([class^=ivu-]){ | ||
92 | + margin-bottom: 0; | ||
93 | + } | ||
86 | } | 94 | } |
87 | &-not-found .@{select-dropdown-prefix-cls} { | 95 | &-not-found .@{select-dropdown-prefix-cls} { |
88 | width: inherit; | 96 | width: inherit; |
src/styles/components/select.less
@@ -173,6 +173,9 @@ | @@ -173,6 +173,9 @@ | ||
173 | &-not-found{ | 173 | &-not-found{ |
174 | text-align: center; | 174 | text-align: center; |
175 | color: @btn-disable-color; | 175 | color: @btn-disable-color; |
176 | + li:not([class^=ivu-]){ | ||
177 | + margin-bottom: 0; | ||
178 | + } | ||
176 | } | 179 | } |
177 | &-loading{ | 180 | &-loading{ |
178 | text-align: center; | 181 | text-align: center; |