<script lang="ts" setup>
import { craftstatus } from '@/apis/crafts'
import { ref } from 'vue'

const statusVisible = ref(false)
const intervalTimes = ref()

const queryCraftStatus = () => {
  intervalTimes.value = setInterval(() => {
    craftstatus().then((res) => {
      console.log('res====', res)
    })
  }, 1000)
}

const showDialog = () => {
  statusVisible.value = true
  queryCraftStatus()
}

defineExpose({
  showDialog,
})
</script>

<template>
  <el-dialog v-model="statusVisible">
    <div>
      <div></div>
      <div></div>
    </div>
  </el-dialog>
</template>
