【增加】Ai Image 列表增加自动刷新

pull/453/head
cherishsince 2024-05-28 09:51:58 +08:00
parent f74e8e6689
commit 0b8301cc1c
2 changed files with 10 additions and 3 deletions

View File

@ -17,6 +17,7 @@ import ImageTaskCard from './ImageTaskCard.vue'
import {bool} from "vue-types"; import {bool} from "vue-types";
const imageList = ref<ImageDetailVO[]>([]) // image const imageList = ref<ImageDetailVO[]>([]) // image
const imageListInterval = ref<any>() // image
const showTaskDetail = ref<bool>(false) // task const showTaskDetail = ref<bool>(false) // task
/** /**
@ -56,12 +57,20 @@ const handlerImageBtnClick = async (type, imageDetail: ImageDetailVO) => {
await handlerDrawerOpen() await handlerDrawerOpen()
} }
} }
// //
defineExpose({getImageList}) defineExpose({getImageList})
// //
onMounted(async () => { onMounted(async () => {
// image
await getImageList() await getImageList()
// image
imageListInterval.value = setInterval(async () => {
await getImageList()
}, 3000)
})
//
onUnmounted(async () => {
}) })
</script> </script>

View File

@ -29,7 +29,6 @@ const selectModel = ref('DALL3绘画')
const modelOptions = ['DALL3绘画', 'MJ绘画'] const modelOptions = ['DALL3绘画', 'MJ绘画']
const drawIn = ref<boolean>(false) // const drawIn = ref<boolean>(false) //
/** /**
* 绘画 - start * 绘画 - start
*/ */
@ -101,5 +100,4 @@ onMounted( async () => {
} }
} }
</style> </style>