Bladeren bron

fix: 修改装饰2的bug

奔跑的面条 3 jaren geleden
bovenliggende
commit
77a6b50307
1 gewijzigde bestanden met toevoegingen van 2 en 18 verwijderingen
  1. 2 18
      src/packages/components/Decorates/Decorates/Decorates02/index.vue

+ 2 - 18
src/packages/components/Decorates/Decorates/Decorates02/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div
     class="go-decorates-2"
-    :style="`width:${w}px; animation-duration:${dur}s`"
+    :style="`width:${w}px; height: ${lineHeight}px animation-duration:${dur}s`"
   >
     <svg :width="w" :height="3">
       <polyline :stroke="colors[0]" :points="`0, 2.5 ${w}, 2.5`" />
@@ -28,28 +28,12 @@ const props = defineProps({
 })
 
 const { w, h } = toRefs(props.chartConfig.attr)
-const { colors, dur } = toRefs(props.chartConfig.option)
+const { colors, dur, lineHeight } = toRefs(props.chartConfig.option)
 </script>
 <style lang="scss" scoped>
 @include go('decorates-2') {
   display: flex;
   flex-direction: column;
   justify-content: center;
-  animation: animationWidth ease-in-out infinite;
-}
-@keyframes animationWidth {
-  0% {
-    width: 0;
-    background-color: aliceblue;
-  }
-
-  70% {
-    width: 100%;
-  }
-
-  100% {
-    width: 100%;
-    background-color: red;
-  }
 }
 </style>