Commit 959ee908 by cherishsince

【优化】修改 Image Task Card 按键类型

parent cb7c5b74
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment