diff --git a/src/views/reorganize/TransferHistoryView.vue b/src/views/reorganize/TransferHistoryView.vue index d7203d04..5b135435 100644 --- a/src/views/reorganize/TransferHistoryView.vue +++ b/src/views/reorganize/TransferHistoryView.vue @@ -11,6 +11,7 @@ import router from '@/router' import { useDisplay } from 'vuetify' import { storageDict } from '@/api/constants' import { VIcon } from 'vuetify/lib/components/index.mjs' +import { L } from '@fullcalendar/list/internal-common' // APP const display = useDisplay() @@ -22,6 +23,9 @@ const $toast = useToast() // 路由 const route = useRoute() +// 组合输入状态 +const isComposing = ref(false) + // 重新整理对话框 const redoDialog = ref(false) @@ -149,7 +153,7 @@ const totalPage = computed(() => { return total }) -// 切换页签和搜索词 +// 切换页签 watch( [() => currentPage.value, () => itemsPerPage.value], debounce(async () => { @@ -157,12 +161,13 @@ watch( }, 1000), ) -watch( - [() => search.value], - debounce(async () => { +// 搜索监听 +watch([() => search.value, () => isComposing.value], async () => { + if (!isComposing.value) { + console.log('search: ' + search.value) reloadPage(true) - }, 1000), -) + } +}) // 获取订阅列表数据 async function fetchData(page = currentPage.value, count = itemsPerPage.value) { @@ -371,6 +376,8 @@ onMounted(fetchData) key="search_navbar" v-model="search" :items="searchHintList" + @compositionstart="isComposing = true" + @compositionend="isComposing = false" class="text-disabled" density="compact" label="搜索整理记录"