fix: Clear the input box when closing the search (#4467)

Signed-off-by: aonoa <1991849113@qq.com>
master
aonoa 1 year ago committed by GitHub
parent 31f6cc6416
commit 4b3d2d21ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -30,16 +30,21 @@ const props = withDefaults(
},
);
const keyword = ref('');
const searchInputRef = ref<HTMLInputElement>();
const [Modal, modalApi] = useVbenModal({
onCancel() {
modalApi.close();
},
onOpenChange(isOpen: boolean) {
if (!isOpen) {
keyword.value = '';
}
},
});
const open = modalApi.useStore((state) => state.isOpen);
const keyword = ref('');
const searchInputRef = ref<HTMLInputElement>();
function handleClose() {
modalApi.close();
keyword.value = '';

Loading…
Cancel
Save