Commit a54ffe7a authored by 姜耀祖's avatar 姜耀祖

删除不适用方法

parent 6bf7630a
Pipeline #21064 passed with stages
in 3 minutes and 10 seconds
......@@ -323,51 +323,6 @@ require(['jquery', 'vue', 'utils','marked','markdown', 'global'], function ($, V
// 这里添加加载对应对话历史的逻辑
// 实际实现时可以调用API获取历史记录
},
// 切换菜单显示状态
toggleMenu(chatId, event) {
// 关闭其他所有菜单
this.historySections.forEach(section => {
section.items.forEach(item => {
if (item.id !== chatId) {
item.showMenu = false;
}
});
});
// 切换当前菜单状态
this.historySections.forEach(section => {
const item = section.items.find(item => item.id === chatId);
if (item) {
item.showMenu = !item.showMenu;
if (item.showMenu) {
this.$nextTick(() => {
const menuBtn = event.currentTarget;
const historyItem = menuBtn.closest('.history-item');
const menuDropdown = menuBtn.nextElementSibling;
// 计算菜单位置
// 使用绝对定位,相对于历史记录项的右下角
menuDropdown.style.position = 'absolute';
menuDropdown.style.right = '0';
menuDropdown.style.top = '100%';
menuDropdown.style.marginTop = '5px';
menuDropdown.style.zIndex = '1000';
});
}
}
});
},
// 点击其他位置隐藏菜单
closeAllMenus() {
this.historySections.forEach(section => {
section.items.forEach(item => {
item.showMenu = false;
});
});
},
// 删除对话
deleteChat(chatId) {
// 关闭菜单
......
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 to comment