Skip to content
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

Merged
merged 7 commits into from
Oct 20, 2023
Merged

Hotfix/menu(#2618) #2620

merged 7 commits into from
Oct 20, 2023

Conversation

aqiusen
Copy link

@aqiusen aqiusen commented Oct 10, 2023

closed #2618

@zyprepare zyprepare added bug Something isn't working 4.x comp:menu labels Oct 13, 2023
if (closePopper) {
closePopper(id)
if(!item.disabled) {
clickMenu && clickMenu(item.id, item)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这2行代码建议使用可选链,代码更简洁

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

if (closePopper) {
closePopper(id)
if(!item.disabled) {
clickMenu && clickMenu(item.id, item)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Copy link
Author

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 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2个类选择器名字一样,是否多余

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是为了增加权限,否则样式无法复写

Copy link
Collaborator

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;
}
}
}

@zyprepare zyprepare added PR: Bug fix 🔧 Bug fix pull request and removed bug Something isn't working labels Oct 20, 2023
@solarjoker solarjoker merged commit aa21320 into XiaoMi:master Oct 20, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Menu中disabled: true属性不生效
3 participants