liyongli 1 éve
szülő
commit
d1c68e5622
1 módosított fájl, 8 hozzáadás és 1 törlés
  1. 8 1
      src/view/finance2023/index.vue

+ 8 - 1
src/view/finance2023/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="finance2023" :style="'font-size:' + font_size + 'px'">
+  <div class="finance2023" :style="'font-size:' + font_size + 'px'" @click="init">
     <!-- 播放键 -->
     <svg
       class="imgbtn"
@@ -163,6 +163,7 @@ const show = ref(false);
 const username = ref(localStorage.getItem('username20230712') || '');
 const img_local = localStorage.getItem('hb20230712');
 let d2 = undefined;
+let isInitAudio = true;
 canvas.width = 750;
 canvas.height = 1334;
 
@@ -195,6 +196,12 @@ const play = () => {
   }
 };
 
+const init = () => {
+    if(!isInitAudio) return;
+    isInitAudio = false;
+    play();
+}
+
 const look_more = ref(false);
 
 const createhb = () => {