File tree Expand file tree Collapse file tree 1 file changed +24
-5
lines changed Expand file tree Collapse file tree 1 file changed +24
-5
lines changed Original file line number Diff line number Diff line change 6
6
<el-segmented v-model =" selectModel" :options =" modelOptions" />
7
7
</div >
8
8
<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 " />
10
10
<Midjourney v-if =" selectModel === 'MJ绘画'" />
11
11
</div >
12
12
</div >
13
13
<div class =" main" >
14
- <ImageTask />
14
+ <ImageTask ref = " imageTaskRef " />
15
15
</div >
16
- <!-- <div class="right">-->
17
- <!-- right-->
18
- <!-- </div>-->
19
16
</div >
20
17
</template >
21
18
@@ -24,11 +21,33 @@ import Dall3 from './dall3/index.vue'
24
21
import Midjourney from ' ./midjourney/index.vue'
25
22
import ImageTask from ' ./ImageTask.vue'
26
23
24
+ // ref
25
+ const imageTaskRef = ref <any >() // image task ref
26
+
27
27
// 定义属性
28
28
const selectModel = ref (' DALL3绘画' )
29
29
const modelOptions = [' DALL3绘画' , ' MJ绘画' ]
30
30
31
31
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
+
32
51
</script >
33
52
34
53
<style scoped lang="scss">
You can’t perform that action at this time.
0 commit comments