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