Skip to content

Commit

Permalink
fix(NoticeBar): fix abnormal scrolling (#3346)
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao authored Dec 11, 2024
1 parent f89f048 commit 0264a1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/notice-bar/notice-bar.less
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@

&__prefix-icon:not(:empty) {
padding-right: @spacer;
width: @notice-bar-icon-font-size;
}

&__suffix-icon {
Expand All @@ -69,6 +70,10 @@
&__prefix-icon,
&__suffix-icon {
font-size: @notice-bar-icon-font-size;

&:empty {
display: none;
}
}

&__operation {
Expand All @@ -84,6 +89,7 @@

&__suffix-icon:not(:empty) {
padding-left: @spacer;
width: @notice-bar-icon-font-size;
}

// theme
Expand Down
2 changes: 1 addition & 1 deletion src/notice-bar/notice-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default class NoticeBar extends SuperComponent {
.then(([nodeRect, wrapRect]) => {
const { marquee } = this.properties;

if (nodeRect == null || wrapRect == null || !nodeRect.width || !wrapRect.width) {
if (nodeRect == null || wrapRect == null || !nodeRect.width || !wrapRect.width || marquee === false) {
return;
}

Expand Down

0 comments on commit 0264a1d

Please sign in to comment.