diff --git a/src/dropdown-item/index.less b/src/dropdown-item/index.less index 162dbe41b..1c292fb26 100644 --- a/src/dropdown-item/index.less +++ b/src/dropdown-item/index.less @@ -28,6 +28,7 @@ &__content { position: absolute; + max-height: @dropdown-menu-content-max-height; } &__icon { diff --git a/src/dropdown-menu/demo/index.vue b/src/dropdown-menu/demo/index.vue index c0df81d5f..b9c9038f4 100644 --- a/src/dropdown-menu/demo/index.vue +++ b/src/dropdown-menu/demo/index.vue @@ -2,84 +2,40 @@ - - + + - - - - - - {{ $t('confirm') }} - + + + + + {{ $t('confirm') }} - - + + - - + + - - + + @@ -104,7 +60,7 @@ export default { option2: [ { text: '默认排序', value: 'a' }, { text: '好评排序', value: 'b' }, - { text: '销量排序', value: 'c' }, + { text: '销量排序', value: 'c' } ] }, 'en-US': { @@ -123,7 +79,7 @@ export default { option2: [ { text: 'Option A', value: 'a' }, { text: 'Option B', value: 'b' }, - { text: 'Option C', value: 'c' }, + { text: 'Option C', value: 'c' } ] } }, diff --git a/src/style/var.less b/src/style/var.less index 18194d7c8..fad33465b 100644 --- a/src/style/var.less +++ b/src/style/var.less @@ -273,6 +273,7 @@ @dropdown-menu-title-padding: 0 @padding-xs; @dropdown-menu-title-line-height: 18px; @dropdown-menu-option-active-color: @blue; +@dropdown-menu-content-max-height: 80%; // Field @field-label-width: 90px;