fix: 修复用户信息处理和组件逻辑
- 在useSessionMenu.ts中,修正用户信息处理逻辑,使用正确的用户ID - 在IndexSider.vue中,移除不必要的watch监听器,简化代码 - 在PanelContent.vue中,优化右键菜单逻辑,确保仅在特定条件下触发
This commit is contained in:
parent
e3f2346d66
commit
b117765bdc
@ -108,8 +108,8 @@ export function useSessionMenu() {
|
|||||||
|
|
||||||
const onUserInfo = (item: ISession) => {
|
const onUserInfo = (item: ISession) => {
|
||||||
console.error('item',item)
|
console.error('item',item)
|
||||||
debugger
|
|
||||||
user(item.receiver_id)
|
user(item.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 移除会话
|
// 移除会话
|
||||||
|
@ -298,13 +298,6 @@ const items = computed((): ISession[] => {
|
|||||||
|
|
||||||
return [...topItems, ...normalItems]
|
return [...topItems, ...normalItems]
|
||||||
})
|
})
|
||||||
watch(
|
|
||||||
() => talkStore,
|
|
||||||
(newValue, oldValue) => {
|
|
||||||
// console.log(newValue)
|
|
||||||
},
|
|
||||||
{ deep: true, immediate: true }
|
|
||||||
)
|
|
||||||
watch(
|
watch(
|
||||||
() => state.addressBookSearchNickName,
|
() => state.addressBookSearchNickName,
|
||||||
(newValue, oldValue) => {
|
(newValue, oldValue) => {
|
||||||
|
@ -324,13 +324,14 @@ const retry=(item:any)=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onContextMenuAvatar=(e:any,item:any)=>{
|
const onContextMenuAvatar=(e:any,item:any)=>{
|
||||||
console.log('item',item)
|
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
if(item.float!=='right'){
|
||||||
bus.emit(EditorConst.Mention, {
|
bus.emit(EditorConst.Mention, {
|
||||||
id: item.user_id,
|
id: item.user_id,
|
||||||
value: item.nickname
|
value: item.nickname
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user