-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hotfix/menu(#2618) #2620
Hotfix/menu(#2618) #2620
Conversation
packages/ui/menu/src/MenuItem.tsx
Outdated
if (closePopper) { | ||
closePopper(id) | ||
if(!item.disabled) { | ||
clickMenu && clickMenu(item.id, item) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这2行代码建议使用可选链,代码更简洁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
packages/ui/menu/src/MenuItem.tsx
Outdated
if (closePopper) { | ||
closePopper(id) | ||
if(!item.disabled) { | ||
clickMenu && clickMenu(item.id, item) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
&--disabled { | ||
@include menu-item-disabled; | ||
|
||
.#{$prefix}-item__inner.#{$prefix}-item__inner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2个类选择器名字一样,是否多余
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是为了增加权限,否则样式无法复写
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议可以按照非禁用状态下的样式结构进行覆写,更利于代码阅读,例如:
&--disabled {
&:hover {
.#{$prefix}-item__inner {
border-bottom: none;
}
}
}
closed #2618