You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
580 B

  1. <script lang="ts" setup>
  2. import { craftstatus } from '@/apis/crafts'
  3. import { ref } from 'vue'
  4. const statusVisible = ref(false)
  5. const intervalTimes = ref()
  6. const queryCraftStatus = () => {
  7. intervalTimes.value = setInterval(() => {
  8. craftstatus().then((res) => {
  9. console.log('res====', res)
  10. })
  11. }, 1000)
  12. }
  13. const showDialog = () => {
  14. statusVisible.value = true
  15. queryCraftStatus()
  16. }
  17. defineExpose({
  18. showDialog,
  19. })
  20. </script>
  21. <template>
  22. <el-dialog v-model="statusVisible">
  23. <div>
  24. <div></div>
  25. <div></div>
  26. </div>
  27. </el-dialog>
  28. </template>