Browse Source

fix:修复运行报错问题

master
wei_yunxiao 8 months ago
parent
commit
5842b529d2
  1. 2
      frontend/src/components/chat/ChatMessage.vue
  2. 6
      godo/libs/chatip.go

2
frontend/src/components/chat/ChatMessage.vue

@ -67,7 +67,7 @@ const store = useChatStore()
<div class="context-menu" v-if="store.contextMenu.visible"
:style="{ top: `${store.contextMenu.y}px`, left: `${store.contextMenu.x}px` }">
<div v-for="item in store.contextMenu.list" class="context-menu-item">
<div class="context-menu-item-font" @click="store.handleContextMenu(item.id)">
<div class="context-menu-item-font" @click="store.handleContextMenu()">
{{ item.label }}
</div>
</div>

6
godo/libs/chatip.go

@ -55,7 +55,11 @@ func GetChatIpSetting() UserChatIpSetting {
if !ok {
return GetDefaultChatIpSetting()
}
return ips.(UserChatIpSetting)
if ips, ok = ips.(UserChatIpSetting); !ok {
return GetDefaultChatIpSetting()
}
return UserChatIpSetting{}
}
// GenerateIPs 生成 IP 地址列表

Loading…
Cancel
Save