@@ -49,6 +51,7 @@ import Dropdown from '~/components/Dropdown.vue'
import { stripMarkdown } from '~/utils/markdown'
import { useIsMobile } from '~/utils/screen'
import { getToken } from '~/utils/auth'
+import BaseUserAvatar from '~/components/BaseUserAvatar.vue'
const config = useRuntimeConfig()
const API_BASE_URL = config.public.apiBaseUrl
@@ -87,10 +90,6 @@ const highlight = (text) => {
return text.replace(reg, (m) => `
${m}`)
}
-const handleAvatarError = (e) => {
- e.target.src = '/default-avatar.svg'
-}
-
watch(selected, async (val) => {
if (!val) return
const user = results.value.find((u) => u.id === val)
@@ -179,6 +178,12 @@ defineExpose({
width: 32px;
height: 32px;
border-radius: 50%;
+ overflow: hidden;
+}
+
+.avatar :deep(.base-user-avatar-img) {
+ width: 100%;
+ height: 100%;
object-fit: cover;
}
diff --git a/frontend_nuxt/components/UserList.vue b/frontend_nuxt/components/UserList.vue
index 09d1fb1a6..d09e0d1f2 100644
--- a/frontend_nuxt/components/UserList.vue
+++ b/frontend_nuxt/components/UserList.vue
@@ -2,7 +2,7 @@
-
+
{{ u.username }}
{{ u.introduction }}
@@ -13,6 +13,7 @@