|
@@ -1,5 +1,5 @@
|
|
|
import { defineComponent, onMounted, reactive, ref, watch } from "vue";
|
|
|
-import { Popover, Icon } from "vant";
|
|
|
+import { Popover, Icon, showToast } from "vant";
|
|
|
import icons from "../icons/index.json";
|
|
|
import iconChild from "./icons/child.png";
|
|
|
import DotIcon from "./icons/dot.png";
|
|
@@ -37,7 +37,10 @@ export default defineComponent({
|
|
|
if (Date.now() - soundEffectData.time > 3000) {
|
|
|
console.log("效音完成");
|
|
|
soundEffectSuccess.value = true
|
|
|
- emit("close");
|
|
|
+ showToast('效音完成')
|
|
|
+ setTimeout(() => {
|
|
|
+ emit("close");
|
|
|
+ }, 1000)
|
|
|
}
|
|
|
}
|
|
|
);
|
|
@@ -78,11 +81,16 @@ export default defineComponent({
|
|
|
<img src={scoreData.src} />
|
|
|
</div>
|
|
|
<div class={styles.tips}>{soundEffectData.tips[soundEffectData.step]}</div>
|
|
|
- <div class={styles.steps}>
|
|
|
+ <div style={{display: soundEffectSuccess.value ? 'none' : ''}} class={styles.steps}>
|
|
|
<img src={soundEffectData.step === 0 ? DotErrorIcon : DotIcon} />
|
|
|
<img src={soundEffectData.step === 1 ? DotActiveIcon : DotIcon} />
|
|
|
<img src={soundEffectData.step === 2 ? DotErrorIcon : DotIcon} />
|
|
|
</div>
|
|
|
+ <div style={{display: soundEffectSuccess.value ? '' : 'none'}} class={styles.steps}>
|
|
|
+ <img src={DotActiveIcon} />
|
|
|
+ <img src={DotActiveIcon} />
|
|
|
+ <img src={DotActiveIcon} />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|