ソースを参照

fix noticeBar name

shenqistart 5 年 前
コミット
3337e9776c

+ 7 - 14
src/packages/noticebar/noticebar.scss

@@ -50,43 +50,36 @@
   .content {
     position: absolute;
     white-space: nowrap;
-    &.van-ellipsis {
+    &.nut-ellipsis {
       max-width: 100%;
     }
-    // &:hover {
-    //   animation: van-notice-bar-play linear infinite both paused;
-    // }
   }
   // 只跑一次
   .play {
-    animation: van-notice-bar-play linear both running;
+    animation: nut-notice-bar-play linear both running;
   }
   .play-infinite {
-    animation: van-notice-bar-play-infinite linear infinite both running;
+    animation: nut-notice-bar-play-infinite linear infinite both running;
   }
   .play-vertical {
-    animation: van-notice-bar-play-vertical linear infinite both running;
+    animation: nut-notice-bar-play-vertical linear infinite both running;
   }
-  //   .play-stop {
-  //     animation: van-notice-bar-play-infinite linear infinite both paused;
-  //   }
 }
 
-@keyframes van-notice-bar-play {
+@keyframes nut-notice-bar-play {
   to {
     transform: translate3d(-100%, 0, 0);
   }
 }
 
-@keyframes van-notice-bar-play-infinite {
+@keyframes nut-notice-bar-play-infinite {
   to {
     transform: translate3d(-100%, 0, 0);
   }
 }
 // 垂直方向的滚动
-@keyframes van-notice-bar-play-vertical {
+@keyframes nut-notice-bar-play-vertical {
   to {
-    // transform: translate3d(0, 40px, 0);
     transform: translateY(40px);
   }
 }

+ 2 - 4
src/packages/noticebar/noticebar.vue

@@ -11,7 +11,7 @@
             <div
                 ref="content"
                 class="content"
-                :class="[ animationClass, { 'van-ellipsis': !scrollable }]"
+                :class="[ animationClass, { 'nut-ellipsis': !scrollable }]"
                 :style="contentStyle"
                 @animationend="onAnimationEnd"
                 @webkitAnimationEnd="onAnimationEnd"
@@ -24,7 +24,7 @@
                 <g fill-rule="evenodd">
                     <path
                         d="M.44 2.56A1.5 1.5 0 1 1 2.56.44l27 27a1.5 1.5 0 1 1-2.12 2.12L15 17.123 2.56 29.56A1.5 1.5 0 1 1 .44 27.44L12.878 15 .44 2.56zM27.44.44a1.5 1.5 0 1 1 2.12 2.12l-9 9a1.5 1.5 0 1 1-2.12-2.12l9-9z"
-                    ></path>
+                    />
                 </g>
             </svg>
         </div>
@@ -144,11 +144,9 @@ export default {
 
             this.firstRound = false;
             this.$nextTick(() => {
-                // this.timer = setTimeout(() => {
                 this.duration =
                     ((this.offsetWidth + this.wrapWidth) / 375) * this.speed;
                 this.animationClass = "play-infinite";
-                // }, 10);
             });
         }
     }