|
|
@ -609,11 +609,18 @@ const changeTop = async (param) => { |
|
|
|
|
|
|
|
const changeTopStatus = async (isTop, id) => { |
|
|
|
try { |
|
|
|
// 立即关闭popover,避免闪现 |
|
|
|
const popoverElement = document.querySelector('.el-popover'); |
|
|
|
if (popoverElement) { |
|
|
|
popoverElement.style.display = 'none'; |
|
|
|
} |
|
|
|
|
|
|
|
if (isTop == 0 && categoryHistory.value[0].list.length >= 3) { |
|
|
|
console.log("超过置顶上线"); |
|
|
|
ElMessage.warning("最多置顶三条内容,已达上限!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
await changeTop({ |
|
|
|
model: props.currentType == "AIchat" ? 1 : 2, |
|
|
|
recordId: id, |
|
|
@ -713,6 +720,16 @@ const selectRecord = async (record) => { |
|
|
|
|
|
|
|
const deleteRecord = (id) => { |
|
|
|
delObj.value.id = id; |
|
|
|
// 立即关闭popover,避免闪现 |
|
|
|
nextTick(() => { |
|
|
|
// 尝试多种方式关闭popover |
|
|
|
const popoverElement = document.querySelector('.el-popover'); |
|
|
|
if (popoverElement) { |
|
|
|
popoverElement.style.display = 'none'; |
|
|
|
} |
|
|
|
// 触发body点击事件来关闭popover |
|
|
|
document.body.click(); |
|
|
|
}); |
|
|
|
openDeleteDialog(); |
|
|
|
}; |
|
|
|
|
|
|
|