1
-
2
1
<template >
3
2
<el-card body-class =" " class =" image-card" >
4
3
<div class =" image-operation" >
8
7
<el-button type =" " text bg v-else-if =" imageDetail.status === 'complete'" >已完成</el-button >
9
8
</div >
10
9
<div >
11
- <el-button class =" btn" text :icon =" Download" @click =" handlerBtnClick('download', imageDetail)" />
12
- <el-button class =" btn" text :icon =" Delete" @click =" handlerBtnClick('delete', imageDetail)" />
13
- <el-button class =" btn" text :icon =" More" @click =" handlerBtnClick('more', imageDetail)" />
10
+ <el-button class =" btn" text :icon =" Download"
11
+ @click =" handlerBtnClick('download', imageDetail)" />
12
+ <el-button class =" btn" text :icon =" Delete" @click =" handlerBtnClick('delete', imageDetail)" />
13
+ <el-button class =" btn" text :icon =" More" @click =" handlerBtnClick('more', imageDetail)" />
14
14
</div >
15
15
</div >
16
16
<div class =" image-wrapper" ref =" cardImageRef" >
17
- <img class =" image" :src =" imageDetail?.picUrl" />
17
+ <img class =" image" :src =" imageDetail?.picUrl" />
18
18
</div >
19
19
</el-card >
20
20
</template >
@@ -37,22 +37,15 @@ const props = defineProps({
37
37
/**
38
38
* 按钮 - 点击事件
39
39
*/
40
- const handlerBtnClick = async (type , imageDetail : ImageDetailVO ) => {
40
+ const handlerBtnClick = async (type , imageDetail : ImageDetailVO ) => {
41
41
emits (' onBtnClick' , type , imageDetail )
42
42
}
43
43
44
- // 监听 imageDetail
45
- // const { imageDetail } = toRefs(props)
46
- // watch(imageDetail, async (newVal, oldValue) => {
47
- // console.log('首次 watch')
48
- //
49
- // })
50
-
51
44
// emits
52
45
const emits = defineEmits ([' onBtnClick' ])
53
46
54
47
//
55
- onMounted ( async () => {
48
+ onMounted (async () => {
56
49
if (props .imageDetail .status === ' in_progress' ) {
57
50
cardImageLoadingInstance .value = ElLoading .service ({
58
51
target: cardImageRef .value ,
0 commit comments