|
|
@@ -107,6 +107,9 @@ const isSearch = ref<boolean>(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"
|
|
|
/>
|
|
|
</view>
|
|
|
<view v-show="!isSearch" class="mx-4 mt-4">
|