Skip to content

Commit 5799eed

Browse files
committed
fix(Advanced Application): In the Assistant's floating window mode at normal size, the execution consumption window is not fully displayed.
1 parent ec11ddc commit 5799eed

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

frontend/src/views/chat/ExecutionDetails.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
11
<script lang="ts" setup>
2-
import { ref } from 'vue'
2+
import { ref, onMounted, onUnmounted } from 'vue'
33
import gou_icon from '@/assets/svg/gou_icon.svg'
44
import icon_error from '@/assets/svg/icon_error.svg'
55
import icon_database_colorful from '@/assets/svg/icon_database_colorful.svg'
66
import icon_alarm_clock_colorful from '@/assets/svg/icon_alarm-clock_colorful.svg'
77
import { chatApi, type ChatLogHistory } from '@/api/chat.ts'
88
import { useI18n } from 'vue-i18n'
9+
import { debounce } from 'lodash-es'
910
1011
const { t } = useI18n()
1112
const logHistory = ref<ChatLogHistory>({})
1213
const dialogFormVisible = ref(false)
1314
const drawerSize = ref('600px')
1415
1516
function getLogList(recordId: any) {
16-
drawerSize.value = window.innerWidth < 500 ? '460px' : '600px'
17+
setDrawerSize()
1718
chatApi.get_chart_log_history(recordId).then((res) => {
1819
logHistory.value = chatApi.toChatLogHistory(res) as ChatLogHistory
1920
dialogFormVisible.value = true
2021
})
2122
}
2223
24+
const setDrawerSize = debounce(() => {
25+
drawerSize.value = window.innerWidth < 500 ? '460px' : '600px'
26+
}, 500)
27+
28+
onMounted(() => {
29+
window.addEventListener('resize', setDrawerSize)
30+
})
31+
32+
onUnmounted(() => {
33+
window.removeEventListener('resize', setDrawerSize)
34+
})
35+
2336
defineExpose({
2437
getLogList,
2538
})

0 commit comments

Comments
 (0)