|
|
|
@ -28,15 +28,16 @@ const props = defineProps({
|
|
|
|
|
default: () => [],
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
const isDismissTask = ref(false)
|
|
|
|
|
const svgName = computed(() => {
|
|
|
|
|
return props.selected ? "taskpack-select" : "taskpack";
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const popconfirmTarget: any = ref(null)
|
|
|
|
|
const popconfirmRef: any = ref(null)
|
|
|
|
|
|
|
|
|
|
function handleDismissTask() {
|
|
|
|
|
isDismissTask.value = true
|
|
|
|
|
emit('dismisClick', props.mouseOverTask.id)
|
|
|
|
|
popconfirmRef.value[0]?.setShow(false); // 关闭 popconfirm
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
@ -44,7 +45,7 @@ onMounted(async () => {
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="list-item" :class="{ 'list-item-selected': selected }">
|
|
|
|
|
<div class="list-item" :class="{ 'list-item-selected': selected }" ref="popconfirmTarget">
|
|
|
|
|
<div v-for="(item, index) in showFieldList" :key="index">
|
|
|
|
|
<div v-if="item.id === 'name'" class="list-item-header">
|
|
|
|
|
<div class="id-wrap">
|
|
|
|
@ -54,12 +55,15 @@ onMounted(async () => {
|
|
|
|
|
{{ listItem.name }}
|
|
|
|
|
</n-ellipsis>
|
|
|
|
|
<span class="list-item-header-selected">({{ listItem.pictureCount }})</span>
|
|
|
|
|
<n-popover placement="bottom" trigger="hover" >
|
|
|
|
|
<n-popconfirm id="taskPopconfirmRef" ref="popconfirmRef" :show-icon="false" :show-arrow="false"
|
|
|
|
|
placement="bottom" trigger="click">
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<span class="dismiss-task-pack" v-show="mouseOverTask?.id" style="cursor: pointer;" @click.stop="handleDismissTask">...</span>
|
|
|
|
|
<span class="dismiss-task-pack" v-show="mouseOverTask?.id" style="cursor: pointer;">...</span>
|
|
|
|
|
</template>
|
|
|
|
|
<span>解散任务包</span>
|
|
|
|
|
</n-popover>
|
|
|
|
|
<template #action>
|
|
|
|
|
<span @click="handleDismissTask" style="cursor: pointer;">解散任务包</span>
|
|
|
|
|
</template>
|
|
|
|
|
</n-popconfirm>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|