import { PropType, defineComponent, onMounted, watch } from "vue"; import { Vue3Lottie } from 'vue3-lottie' import { browser } from '/src/helpers/utils' import styles from "./index.module.less"; import delay_bg from "./image/bg.json" import left_adorn from "./image/left_ adorn.json" import right_adorn from "./image/right_ adorn.json" import step1 from "./image/step1_icon.json" import step2 from "./image/step2_icon.json" import step3 from "./image/step3_icon.json" import step4 from "./image/step4_icon.json" import step5 from "./image/step5_icon.json" import step_tips_1 from "./image/step_tips_icon1.png" import step_tips_2 from "./image/step_tips_icon2.png" import step_tips_3 from "./image/step_tips_icon3.png" import step_tips_4 from "./image/step_tips_icon4.png" import step_tips_5 from "./image/step_tips_icon5.png" import step_tips_5_1 from "./image/step_tips_icon5_1.png" import step_tips_5_2 from "./image/step_tips_icon5_2.png" import step_top_icon from "./image/step_top_icon.png" import step_top_icon_1 from "./image/step_top_icon_1.png" import step_top_icon_2 from "./image/step_top_icon_2.png" import step_top_icon_3 from "./image/step_top_icon_3.png" import step_top_icon_4 from "./image/step_top_icon_4.png" import step_top_icon_5 from "./image/step_top_icon_5.png" import step_btn_1 from "./image/delay_btn_icon1.png" import step_btn_2 from "./image/delay_btn_icon2.png" import setp_dot_1 from './image/step_state_icon1.png' import setp_dot_2 from './image/step_state_icon2.png' import setp_dot_3 from './image/step_state_icon3.png' import iconBack from './image/icon-back.png' interface IDelayData { /** 延迟时间 */ time: number; /** 检测次数 */ count: number; /** 耳机状态 */ erji: boolean; checkStatus: "init" | "ing" | "error"; step: number; earPhoneType: string; } const browserInfo = browser() /** 延迟检测组件 */ export default defineComponent({ name: "CheckDelayPopup", emits: ["close", "startCheckDelay", "load", "back"], props: { delayData: { type: Object as PropType, default: () => ({ time: 0, count: 0 }), }, }, setup(props, { emit }) { return () => (
{/*返回按钮*/} emit("back")} /> = 6 ? '' : 'none' }}>
= 6 && props.delayData.earPhoneType !== "有线耳机" ? step_top_icon_4 : props.delayData.step >= 6 && props.delayData.earPhoneType === "有线耳机" ? step_top_icon_5 : '' } /> { props.delayData.step <= 2 ?
: props.delayData.step === 3 ?
: props.delayData.step === 4 ?
: props.delayData.step === 5 ?
:
}
= 6 && !props.delayData.erji ? '' : 'none' }} /> = 6 && props.delayData.erji && props.delayData.earPhoneType !== "有线耳机" ? '' : 'none' }} /> = 6 && props.delayData.erji && props.delayData.earPhoneType === "有线耳机" ? '' : 'none' }} /> emit("startCheckDelay")} /> = 6 ? '' : 'none' }} onClick={() => {emit("close")}} />
); }, });