|
@ -26,7 +26,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<template #overlay> |
|
|
<template #overlay> |
|
|
<a-menu @click="({ key: menuKey }) => onContextMenuClick(item.id, menuKey)"> |
|
|
<a-menu @click="({ key: menuKey }) => onContextMenuClick(item, menuKey)"> |
|
|
<a-menu-item key="edit">编辑</a-menu-item> |
|
|
<a-menu-item key="edit">编辑</a-menu-item> |
|
|
<a-menu-item key="delete">删除</a-menu-item> |
|
|
<a-menu-item key="delete">删除</a-menu-item> |
|
|
</a-menu> |
|
|
</a-menu> |
|
@ -148,8 +148,10 @@ function loadVideoCanvas() { |
|
|
changeVideoCanvasSize(); |
|
|
changeVideoCanvasSize(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
const onContextMenuClick = (labelId: string, menuKey: string) => { |
|
|
const onContextMenuClick = (item: any, menuKey: string,) => { |
|
|
console.log(`labelId: ${labelId}, menuKey: ${menuKey}`); |
|
|
console.log(`labelId: ${item.id}, menuKey: ${menuKey}`); |
|
|
|
|
|
// console.log(`item: ${item}`); |
|
|
|
|
|
console.log(item); |
|
|
//防止添加多个key值,再次点击不能关闭。数组去重 |
|
|
//防止添加多个key值,再次点击不能关闭。数组去重 |
|
|
if (menuKey == "edit") { |
|
|
if (menuKey == "edit") { |
|
|
popup("编辑标签", [h(LabelEditModel)], "editLabel"); |
|
|
popup("编辑标签", [h(LabelEditModel)], "editLabel"); |
|
@ -178,7 +180,7 @@ const onContextMenuClick = (labelId: string, menuKey: string) => { |
|
|
danger: true, |
|
|
danger: true, |
|
|
}, |
|
|
}, |
|
|
onOk() { |
|
|
onOk() { |
|
|
deleteLabel(parseInt(labelId)) |
|
|
deleteLabel(parseInt(item.id)) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
style: "top: 250px", |
|
|
style: "top: 250px", |
|
|