Skip to content

Commit 824fb4d

Browse files
committed
【增加】Image AI 监听 dall 生成完成,刷新图片列表
1 parent d74677a commit 824fb4d

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

src/views/ai/image/index.vue

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@
66
<el-segmented v-model="selectModel" :options="modelOptions" />
77
</div>
88
<div class="modal-switch-container">
9-
<Dall3 v-if="selectModel === 'DALL3绘画'"/>
9+
<Dall3 v-if="selectModel === 'DALL3绘画'" @on-draw-start="handlerDrawStart" @on-draw-complete="handlerDrawComplete" />
1010
<Midjourney v-if="selectModel === 'MJ绘画'" />
1111
</div>
1212
</div>
1313
<div class="main">
14-
<ImageTask />
14+
<ImageTask ref="imageTaskRef" />
1515
</div>
16-
<!-- <div class="right">-->
17-
<!-- right-->
18-
<!-- </div>-->
1916
</div>
2017
</template>
2118

@@ -24,11 +21,33 @@ import Dall3 from './dall3/index.vue'
2421
import Midjourney from './midjourney/index.vue'
2522
import ImageTask from './ImageTask.vue'
2623
24+
// ref
25+
const imageTaskRef = ref<any>() // image task ref
26+
2727
// 定义属性
2828
const selectModel = ref('DALL3绘画')
2929
const modelOptions = ['DALL3绘画', 'MJ绘画']
3030
3131
32+
/**
33+
* 绘画 - start
34+
*/
35+
const handlerDrawStart = async (type) => {
36+
// todo
37+
}
38+
39+
/**
40+
* 绘画 - complete
41+
*/
42+
const handlerDrawComplete = async (type) => {
43+
// todo
44+
await imageTaskRef.value.getImageList()
45+
}
46+
47+
//
48+
onMounted( async () => {
49+
})
50+
3251
</script>
3352

3453
<style scoped lang="scss">

0 commit comments

Comments
 (0)