【增加】Image AI 监听 dall 生成完成,刷新图片列表

pull/453/head
cherishsince 2024-05-27 17:35:50 +08:00
parent d74677abd0
commit 824fb4d5ec
1 changed files with 24 additions and 5 deletions

View File

@ -6,16 +6,13 @@
<el-segmented v-model="selectModel" :options="modelOptions" /> <el-segmented v-model="selectModel" :options="modelOptions" />
</div> </div>
<div class="modal-switch-container"> <div class="modal-switch-container">
<Dall3 v-if="selectModel === 'DALL3'"/> <Dall3 v-if="selectModel === 'DALL3'" @on-draw-start="handlerDrawStart" @on-draw-complete="handlerDrawComplete" />
<Midjourney v-if="selectModel === 'MJ'" /> <Midjourney v-if="selectModel === 'MJ'" />
</div> </div>
</div> </div>
<div class="main"> <div class="main">
<ImageTask /> <ImageTask ref="imageTaskRef" />
</div> </div>
<!-- <div class="right">-->
<!-- right-->
<!-- </div>-->
</div> </div>
</template> </template>
@ -24,11 +21,33 @@ import Dall3 from './dall3/index.vue'
import Midjourney from './midjourney/index.vue' import Midjourney from './midjourney/index.vue'
import ImageTask from './ImageTask.vue' import ImageTask from './ImageTask.vue'
// ref
const imageTaskRef = ref<any>() // image task ref
// //
const selectModel = ref('DALL3绘画') const selectModel = ref('DALL3绘画')
const modelOptions = ['DALL3绘画', 'MJ绘画'] const modelOptions = ['DALL3绘画', 'MJ绘画']
/**
* 绘画 - start
*/
const handlerDrawStart = async (type) => {
// todo
}
/**
* 绘画 - complete
*/
const handlerDrawComplete = async (type) => {
// todo
await imageTaskRef.value.getImageList()
}
//
onMounted( async () => {
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">