【增加】Ai Image 列表增加自动刷新
parent
f74e8e6689
commit
0b8301cc1c
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue