diff --git a/ui/src/views/log/component/ChatRecordDrawer.vue b/ui/src/views/log/component/ChatRecordDrawer.vue index d09966be0..da9dac0af 100644 --- a/ui/src/views/log/component/ChatRecordDrawer.vue +++ b/ui/src/views/log/component/ChatRecordDrawer.vue @@ -49,7 +49,7 @@ const props = withDefaults( /** * 对话 记录id */ - chartId?: string + chartId: string /** * 下一条 */ @@ -66,7 +66,7 @@ const props = withDefaults( {} ) -defineEmits(['update:chartId']) +const emit = defineEmits(['update:chartId']) const route = useRoute() const { @@ -107,6 +107,12 @@ watch( } ) +watch(visible, (bool) => { + if (!bool) { + emit('update:chartId', '') + } +}) + const open = () => { getChatRecord() visible.value = true