Skip to content

Commit

Permalink
fix: Properly adjust the disabled backgrpund of the KMenu component
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwusanyu-c committed Jan 14, 2025
1 parent 65519ee commit aaaf3cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions components/Menu/src/item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,9 @@
};
if (it.disabled || it.disabledParent) {
basicCls = {
[`${prefixCls}-disabled`]: true,
[`${prefixCls}-disabled__dark`]: isDark(it)
[`${prefixCls}-disabled`]: level !== 1,
[`${prefixCls}-disabled__dark`]: isDark(it),
[`${prefixCls}-disabled-l1`]: level === 1
};
if (hasSub(it)) {
it.children = it.children!.map((item) => {
Expand Down
3 changes: 2 additions & 1 deletion preset/src/shortcuts/src/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export const menuShortcuts: Record<string, string> = {
'fcc pr h-40px leading-40px list-inside ps-16px p-ie-16px m-is-4px m-ie-4px my-4px ' +
'rounded-8px',
'k-menu-item-active': 'active:(ikun:20:bg-ikun-main)',
'k-menu-item-disabled': 'k-bg-disabled k-cur-disabled',
'k-menu-item-disabled': 'k-bg-disabled k-cur-disabled text-ikun-info',
'k-menu-item-disabled-l1': 'k-cur-disabled text-ikun-info',
'k-menu-item-horizontal-not-top': 'k-menu-item-horizontal fbc',
'k-menu-item-horizontal-group':
'k-menu-w k-menu-transition ' +
Expand Down

0 comments on commit aaaf3cb

Please sign in to comment.