|
@@ -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 = '';
|