Skip to content

Commit

Permalink
feat(dropdown): [dropdown] add right side expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
MomoPoppy committed Dec 11, 2024
1 parent 62b2793 commit 64bdaaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion examples/sites/demos/apis/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
7 changes: 4 additions & 3 deletions packages/theme/src/dropdown-item/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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} {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 64bdaaa

Please sign in to comment.