|
@@ -38,7 +38,7 @@
|
|
|
|
|
|
<script setup lang="ts" name="MessageWindow">
|
|
<script setup lang="ts" name="MessageWindow">
|
|
/** 发送/回复消息 */
|
|
/** 发送/回复消息 */
|
|
-import { ref, computed, withDefaults, nextTick } from 'vue'
|
|
|
|
|
|
+import { ref, computed, withDefaults, nextTick, watch } from 'vue'
|
|
import useVModel from '@/hooks/useVModel'
|
|
import useVModel from '@/hooks/useVModel'
|
|
import BaseDialog from '@/components/element/BaseDialog.vue'
|
|
import BaseDialog from '@/components/element/BaseDialog.vue'
|
|
import MessageHistory from '@/components/shared/message/MessageList.vue'
|
|
import MessageHistory from '@/components/shared/message/MessageList.vue'
|
|
@@ -82,7 +82,14 @@ const refresh = () => {
|
|
visible.value = true
|
|
visible.value = true
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+watch(visible, () => {
|
|
|
|
+ if (!visible.value) {
|
|
|
|
+ replyUserId.value = null
|
|
|
|
+ replyUserName.value = null
|
|
|
|
+ currentMessage.value = null
|
|
|
|
+ modalType.value = 'view'
|
|
|
|
+ }
|
|
|
|
+})
|
|
const onChangeType = (type: ModalType) => {
|
|
const onChangeType = (type: ModalType) => {
|
|
modalType.value = type
|
|
modalType.value = type
|
|
}
|
|
}
|