loading.tsx 860 B

1234567891011121314151617181920212223242526272829
  1. import { defineComponent, ref, watch } from "vue"
  2. import icon_loading_img from "./img/icon_loading_img.png"
  3. import { Progress } from "vant"
  4. import styles from "./index.module.less"
  5. import state from "/src/state"
  6. import { Vue3Lottie } from "vue3-lottie";
  7. import animBg from "./img/refresh_anim.json";
  8. import animGif from "./img/refresh_anim.gif";
  9. export default defineComponent({
  10. name: "loading",
  11. props: {
  12. /** 提示文案 */
  13. tipText: {
  14. type: String,
  15. default: '',
  16. },
  17. },
  18. setup(props) {
  19. return () =>
  20. !state.audioDone && (
  21. <div class={styles.loadingPop}>
  22. <img class={styles.lottie} src={animGif} />
  23. {/* <Vue3Lottie class={styles.lottie} animationData={animBg}></Vue3Lottie> */}
  24. <div class={styles.loadingTip}>{props.tipText}</div>
  25. </div>
  26. )
  27. }
  28. })