【优化】修改 Image Task Card 按键类型
This commit is contained in:
parent
cb7c5b7458
commit
959ee90810
@ -2,7 +2,7 @@
|
||||
<template>
|
||||
<el-card class="dr-task" body-class="task-card" shadow="never">
|
||||
<template #header>绘画任务</template>
|
||||
<ImageTaskCard v-for="image in imageList" :key="image" :image-detail="image" />
|
||||
<ImageTaskCard v-for="image in imageList" :key="image" :image-detail="image" @on-btn-click="handlerImageBtnClick" />
|
||||
</el-card>
|
||||
<!-- 图片 detail 抽屉 -->
|
||||
<ImageDetailDrawer
|
||||
@ -48,6 +48,15 @@ const getImageList = async () => {
|
||||
imageList.value = await ImageApi.getImageList({pageNo: 1, pageSize: 20})
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片 - btn click
|
||||
*/
|
||||
const handlerImageBtnClick = async (type, imageDetail: ImageDetailVO) => {
|
||||
if (type === 'more') {
|
||||
await handlerDrawerOpen()
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
onMounted(async () => {
|
||||
await getImageList()
|
||||
|
@ -32,11 +32,11 @@ const props = defineProps({
|
||||
* 按钮 - 点击事件
|
||||
*/
|
||||
const handlerBtnClick = async (type, imageDetail: ImageDetailVO ) => {
|
||||
emits('handlerBtnClick', type, imageDetail)
|
||||
emits('onBtnClick', type, imageDetail)
|
||||
}
|
||||
|
||||
// emits
|
||||
const emits = defineEmits(['handlerBtnClick'])
|
||||
const emits = defineEmits(['onBtnClick'])
|
||||
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user