mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-23 09:40:25 +08:00
fix: Clear the input box when closing the search (#4467)
Signed-off-by: aonoa <1991849113@qq.com>
This commit is contained in:
parent
31f6cc6416
commit
4b3d2d21ed
@ -30,16 +30,21 @@ const props = withDefaults(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const keyword = ref('');
|
||||||
|
const searchInputRef = ref<HTMLInputElement>();
|
||||||
|
|
||||||
const [Modal, modalApi] = useVbenModal({
|
const [Modal, modalApi] = useVbenModal({
|
||||||
onCancel() {
|
onCancel() {
|
||||||
modalApi.close();
|
modalApi.close();
|
||||||
},
|
},
|
||||||
|
onOpenChange(isOpen: boolean) {
|
||||||
|
if (!isOpen) {
|
||||||
|
keyword.value = '';
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const open = modalApi.useStore((state) => state.isOpen);
|
const open = modalApi.useStore((state) => state.isOpen);
|
||||||
|
|
||||||
const keyword = ref('');
|
|
||||||
const searchInputRef = ref<HTMLInputElement>();
|
|
||||||
|
|
||||||
function handleClose() {
|
function handleClose() {
|
||||||
modalApi.close();
|
modalApi.close();
|
||||||
keyword.value = '';
|
keyword.value = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user