diff --git a/src/pages/pet-manual/index.vue b/src/pages/pet-manual/index.vue index 45bedfb..3d80831 100644 --- a/src/pages/pet-manual/index.vue +++ b/src/pages/pet-manual/index.vue @@ -107,6 +107,9 @@ const isSearch = ref(false) function handleSearchFocus() { isSearch.value = false } +function handleCancel() { + isSearch.value = true +} const historyList = ref<{ name: string }[]>([ { name: '猫' }, { name: '狗' }, @@ -131,6 +134,7 @@ const findList = ref<{ name: string }[]>([ :cancel-button="isSearch ? 'none' : 'auto'" :radius="20" @focus="handleSearchFocus" + @cancel="handleCancel" />