Jelajahi Sumber

Merge branch 'local' of https://github.com/le5le-com/visualization-design into local

ananzhusen 1 tahun lalu
induk
melakukan
2aa25ae2dd
2 mengubah file dengan 10 tambahan dan 2 penghapusan
  1. 1 1
      src/App.vue
  2. 9 1
      src/views/components/PenAnimates.vue

+ 1 - 1
src/App.vue

@@ -15,7 +15,7 @@ onBeforeMount(() => {
   setTimeout(() => {
     registerTheme();
     changeTheme('le-dark');
-  }, 1000);
+  }, 0);
 });
 </script>
 <style lang="postcss" scoped></style>

+ 9 - 1
src/views/components/PenAnimates.vue

@@ -173,6 +173,7 @@
                 class="ml-8 mt-8"
                 size="small"
                 v-model="item.autoPlay"
+                @change="changeAnimateAutoPlay($event,item)"
               />
             </div>
             <div
@@ -223,7 +224,14 @@ import AnimateFrames from './AnimateFrames.vue';
 const props = defineProps<{
   pen: any;
 }>();
-
+function changeAnimateAutoPlay(value,item) {
+  props.pen.animations.forEach(i=>{
+    if(i.name !== item.name){
+      i.autoPlay = false
+    }
+  })
+  item.autoPlay = true
+}
 const penTree: any = ref([]);
 
 const openedCollapses = ref([0]);