liushengqiang 1 year ago
parent
commit
d8cd314f2f

+ 1 - 1
src/components/TheNoticeBar/index.module.less

@@ -3,7 +3,7 @@
     overflow: hidden;
     display: flex;
     align-items: center;
-    &:hover{
+    &.isAnitaion, &:hover{
         .notice{
             width: auto;
             overflow: initial;

+ 1 - 1
src/components/TheNoticeBar/index.tsx

@@ -70,7 +70,7 @@ export default defineComponent({
     return () => (
       <div
         ref={wrapRef}
-        class={styles.wrap}
+        class={[styles.wrap, props.isAnimation ? styles.isAnitaion : '']}
         onMouseenter={() => init()}
         onMouseleave={() => stopAnimate()}>
         <div