From 27cd042df9aca0383a49f3514bc21958dd890912 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 29 六月 2026 15:42:23 +0800
Subject: [PATCH] 银川 1.联调产品维护页面 2.添加IM即时通讯模块
---
src/views/im/home/pages/contact/group-list.vue | 65 ++++++++++++++++++++++++++++++++
1 files changed, 65 insertions(+), 0 deletions(-)
diff --git a/src/views/im/home/pages/contact/group-list.vue b/src/views/im/home/pages/contact/group-list.vue
new file mode 100644
index 0000000..cff18ca
--- /dev/null
+++ b/src/views/im/home/pages/contact/group-list.vue
@@ -0,0 +1,65 @@
+<script lang="ts" setup>
+import type { GroupLite } from '../../types'
+
+import { computed, ref } from 'vue'
+
+import { IconifyIcon as Icon } from '#/packages/icons/src'
+
+import { GroupItem } from '../../components/group'
+
+defineOptions({ name: 'ImContactGroupList' })
+
+const props = defineProps<{
+ activeId?: number
+ groups: GroupLite[]
+ keyword: string
+}>()
+
+const emit = defineEmits<{ select: [group: GroupLite] }>()
+
+const expanded = ref(true)
+
+const filtered = computed(() => {
+ const keywordLower = props.keyword.trim().toLowerCase()
+ if (!keywordLower) {
+ return props.groups
+ }
+ return props.groups.filter((group) =>
+ (group.showGroupName || group.name || '').toLowerCase().includes(keywordLower)
+ )
+})
+</script>
+
+<template>
+ <!--
+ 閫氳褰� - 缇よ亰鍒嗙粍
+ - 鑷不锛氭姌鍙犵姸鎬� + 鍏抽敭瀛楄繃婊ゆ湰缁勪欢鍐呴棴鐜�
+ - 閫変腑鎬佺敱鐖剁骇 activeId 閫忎紶锛岄伩鍏嶅瓙缁勪欢鎸佹湁 selection 鐭ヨ瘑
+ -->
+ <div>
+ <!-- 鎶樺彔鍒嗙粍澶达細瀛楀彿瀵归綈寰俊 PC锛�15px锛夛紝hover 娴呭簳鑹插弽棣� -->
+ <div
+ class="flex gap-2 items-center px-3.5 py-2.5 text-15px text-[var(--ant-color-text)] cursor-pointer select-none hover:bg-[var(--ant-color-fill-secondary)]"
+ @click="expanded = !expanded"
+ >
+ <Icon :icon="expanded ? 'ep:caret-bottom' : 'ep:caret-right'" :size="14" />
+ <span class="flex-1">缇よ亰</span>
+ <span class="text-sm text-[var(--ant-color-text-secondary)]">{{ filtered.length }}</span>
+ </div>
+ <div v-show="expanded">
+ <GroupItem
+ v-for="group in filtered"
+ :key="group.id"
+ :group="group"
+ :active="activeId === group.id"
+ @click="emit('select', group)"
+ />
+ <div
+ v-if="filtered.length === 0"
+ class="py-3 text-12px text-center text-[var(--ant-color-text-disabled)]"
+ >
+ {{ keyword ? '娌℃湁鍖归厤鐨勭兢鑱�' : '鏆傛棤缇よ亰' }}
+ </div>
+ </div>
+ </div>
+</template>
--
Gitblit v1.9.3