From a28bc982af1164730d074209bc131ecbcbf2e2a5 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Thu, 18 May 2017 16:34:09 +0800 Subject: [PATCH] update Cascader style --- examples/routers/cascader.vue | 40 +++++++++++++++++++++++++++++++++++----- src/styles/components/cascader.less | 8 ++++++++ src/styles/components/select.less | 3 +++ 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/examples/routers/cascader.vue b/examples/routers/cascader.vue index 09e14d5..1a843a8 100644 --- a/examples/routers/cascader.vue +++ b/examples/routers/cascader.vue @@ -5,7 +5,7 @@ {{ v1 }} - + @@ -28,10 +28,40 @@ children: [{ value: 'nanjing', label: '南京', - children: [{ - value: 'zhonghuamen', - label: '中华门' - }] + children: [ + { + value: 'zhonghuamen', + label: '中华门' + }, + { + value: 'v1', + label: 'v111' + }, + { + value: 'v2', + label: 'v2222' + }, + { + value: 'v3', + label: 'v333' + }, + { + value: 'v4', + label: 'v4444' + }, + { + value: 'v5', + label: 'v555' + }, + { + value: 'v6', + label: 'v666' + }, + { + value: 'v7', + label: 'v777' + } + ] }] } ], diff --git a/src/styles/components/cascader.less b/src/styles/components/cascader.less index 630e525..d5726a5 100644 --- a/src/styles/components/cascader.less +++ b/src/styles/components/cascader.less @@ -77,12 +77,20 @@ &-dropdown{ padding: 5px 0; + .@{select-dropdown-prefix-cls}-list{ + max-height: 190px; + box-sizing: border-box; + overflow: auto; + } } &-not-found-tip{ padding: 5px 0; text-align: center; color: @btn-disable-color; + li:not([class^=ivu-]){ + margin-bottom: 0; + } } &-not-found .@{select-dropdown-prefix-cls} { width: inherit; diff --git a/src/styles/components/select.less b/src/styles/components/select.less index 2227c96..7a03192 100644 --- a/src/styles/components/select.less +++ b/src/styles/components/select.less @@ -173,6 +173,9 @@ &-not-found{ text-align: center; color: @btn-disable-color; + li:not([class^=ivu-]){ + margin-bottom: 0; + } } &-loading{ text-align: center; -- libgit2 0.21.4