From 64bdaaa9760f0494c7a68e28773f53cda4f78a09 Mon Sep 17 00:00:00 2001 From: zhanyini Date: Wed, 11 Dec 2024 14:19:01 -0800 Subject: [PATCH] feat(dropdown): [dropdown] add right side expansion --- examples/sites/demos/apis/dropdown.js | 5 ++++- packages/theme/src/dropdown-item/index.less | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/sites/demos/apis/dropdown.js b/examples/sites/demos/apis/dropdown.js index b32b6a7e0f..7bd22cd915 100644 --- a/examples/sites/demos/apis/dropdown.js +++ b/examples/sites/demos/apis/dropdown.js @@ -371,7 +371,10 @@ export default { 'en-US': 'Menu pop-up location ' }, mode: ['pc'], - pcDemo: 'basic-usage' + pcDemo: 'placement', + meta: { + experimental: '3.21.0' + } }, { name: 'popper-class', diff --git a/packages/theme/src/dropdown-item/index.less b/packages/theme/src/dropdown-item/index.less index eef2083ad8..0ad12fecfc 100644 --- a/packages/theme/src/dropdown-item/index.less +++ b/packages/theme/src/dropdown-item/index.less @@ -14,6 +14,7 @@ @import './vars.less'; @dropdown-item-prefix-cls: ~'@{css-prefix}dropdown-item'; +@dropdown-menu-prefix-cls: ~'@{css-prefix}dropdown-menu'; @svg-prefix-cls: ~'@{css-prefix}svg'; .@{dropdown-item-prefix-cls} { @@ -157,11 +158,11 @@ } /* 右侧展开 */ -.tiny-dropdown-menu[x-placement='bottom-start'], -.tiny-dropdown-menu[x-placement='top-start'] { +.@{dropdown-menu-prefix-cls}[x-placement='bottom-start'], +.@{dropdown-menu-prefix-cls}[x-placement='top-start'] { &:has(.has-children) { &, - .tiny-dropdown-menu { + .@{dropdown-menu-prefix-cls} { & > li:not(.has-children) .@{dropdown-item-prefix-cls}__content { margin-left: 0; }