diff --git a/src/components/common/customModal.vue b/src/components/common/customModal.vue
index bfee602..1191784 100644
--- a/src/components/common/customModal.vue
+++ b/src/components/common/customModal.vue
@@ -80,7 +80,7 @@ const props = defineProps({
}
})
-const emit = defineEmits(['update:show', 'cancel', 'confirm'])
+const emit = defineEmits(['update:show', 'cancel', 'confirm', 'customCloseModal'])
const show = computed({
get: () => props.show,
@@ -111,7 +111,7 @@ const state = reactive({
const handleCloseModal = () => {
if (props.customCloseEvent) {
- emit('closeModal')
+ emit('customCloseModal')
} else {
show.value = false
}
diff --git a/src/components/group/GroupPanel.vue b/src/components/group/GroupPanel.vue
index 2416885..2c11bed 100644
--- a/src/components/group/GroupPanel.vue
+++ b/src/components/group/GroupPanel.vue
@@ -740,7 +740,8 @@ const handleEditGroupNameConfirm = () => {
diff --git a/src/components/search/searchList.vue b/src/components/search/searchList.vue
index cd9e97e..539e26a 100644
--- a/src/components/search/searchList.vue
+++ b/src/components/search/searchList.vue
@@ -2,6 +2,7 @@
@@ -19,12 +20,19 @@
searchResultKey !== 'group_infos' &&
searchResultKey !== 'group_member_infos'
"
+ :style="{ margin: props.useCustomTitle ? '0' : '' }"
>
-
+
+
{
@@ -223,6 +236,12 @@ watch(
watch(
() => props.searchText,
(newVal, oldVal) => {
+ // 同步更新 state.searchText
+ state.searchText = newVal
+ // 清空搜索结果
+ state.searchResult = null
+ // 重置页码
+ state.pageNum = 1
//重置点击停留列表项
state.clickStayItem = ''
emits('clickStayItemChange', state.clickStayItem)
@@ -232,18 +251,6 @@ watch(
}
)
-//输入搜索文本
-const inputSearchText = (e) => {
- if (e.trim() != state.searchText.trim()) {
- state.pageNum = 1
- state.searchResult = null // 清空搜索结果
- }
- state.searchText = e.trim()
- if (!e.trim()) {
- state.searchResult = null // 清空搜索结果
- }
-}
-
// ES搜索聊天记录-主页搜索什么都有、指定用户、指定群、群与用户概览
const queryAllSearch = (doClearSearchResult) => {
if (doClearSearchResult) {
@@ -369,6 +376,7 @@ const queryAllSearch = (doClearSearchResult) => {
} else {
state.hasMore = true
}
+ emits('resultTotalCount', total)
// zPaging.value?.completeByTotal([data], total)
} else {
state.searchResult = data
@@ -534,10 +542,9 @@ const doLoadMore = (doClearSearchResult) => {
return
}
state.loading = true
- queryAllSearch(doClearSearchResult)
- .finally(() => {
- state.loading = false
- })
+ queryAllSearch(doClearSearchResult).finally(() => {
+ state.loading = false
+ })
}