+
+
取消{{ actionBtns?.cancelBtn?.text || '取消' }}
确定{{ actionBtns?.confirmBtn?.text || '确定' }}
@@ -63,6 +67,11 @@ const props = defineProps({
// 是否显示自定义关闭按钮
type: Boolean,
default: false
+ },
+ customModalBtnsStyle: {
+ // 自定义按钮样式
+ type: String,
+ default: ''
}
})
@@ -74,12 +83,16 @@ const show = computed({
})
const handleCancel = () => {
- show.value = false
+ if (props.actionBtns?.cancelBtn?.hideModal) {
+ show.value = false
+ }
emit('cancel')
}
const handleConfirm = () => {
- state.confirmBtnLoading = true
+ if (props.actionBtns?.confirmBtn?.doLoading) {
+ state.confirmBtnLoading = true
+ }
emit('confirm', closeLoading)
}
diff --git a/src/components/group/GroupPanel.vue b/src/components/group/GroupPanel.vue
index 2a84f25..5db3975 100644
--- a/src/components/group/GroupPanel.vue
+++ b/src/components/group/GroupPanel.vue
@@ -19,7 +19,12 @@ import UserCardModal from '@/components/user/UserCardModal.vue'
const userStore = useUserStore()
const { showUserInfoModal } = useInject()
-const emit = defineEmits(['close', 'to-talk', 'handleSearchRecordByConditionModalShow'])
+const emit = defineEmits([
+ 'close',
+ 'to-talk',
+ 'handleSearchRecordByConditionModalShow',
+ 'handleGroupNoticeModalShow'
+])
const props = defineProps({
gid: {
type: Number,
@@ -59,8 +64,12 @@ const state = reactive({
chatSettingOperateHint: '', // 提示信息
chatSettingOperateSubHint: '', // 次要提示信息
actionBtns: {
- confirmBtn: true,
- cancelBtn: true
+ confirmBtn: {
+ doLoading: true
+ },
+ cancelBtn: {
+ hideModal: true
+ }
}, // 操作按钮
showAllMember: false, // 是否显示全部成员
openGroupMemberSearch: false, //是否开启群成员搜索
@@ -192,9 +201,11 @@ const showChatSettingOperateModal = (type: string) => {
switch (type) {
case 'clear':
state.chatSettingOperateHint = '确定清空聊天记录'
+ state.chatSettingOperateSubHint = ''
break
case 'dismiss':
state.chatSettingOperateHint = '确定解散本群'
+ state.chatSettingOperateSubHint = ''
break
case 'quit':
state.chatSettingOperateHint = '确定退出群聊'
@@ -209,6 +220,7 @@ const showChatSettingOperateModal = (type: string) => {
}
}
+//点击显示查找聊天记录模态框
const showSearchRecordByConditionModal = () => {
emit('handleSearchRecordByConditionModalShow', true)
}
@@ -243,6 +255,11 @@ const showMemberInfo = (memberItem: any) => {
state.userInfo = memberItem
state.isShowUserCardModal = true
}
+
+//点击显示群公告模态框
+const showGroupNoticeModal = () => {
+ emit('handleGroupNoticeModalShow', true)
+}
@@ -402,7 +419,7 @@ const showMemberInfo = (memberItem: any) => {
-->