|
@@ -50,7 +50,7 @@
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
import type { ModalProps, ModalMethods } from './typing';
|
|
|
-
|
|
|
+ import { debounce } from 'lodash-es';
|
|
|
import {
|
|
|
defineComponent,
|
|
|
computed,
|
|
@@ -202,10 +202,13 @@
|
|
|
fullScreenRef.value = !!props.defaultFullscreen;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- function handleOk(e: Event) {
|
|
|
- emit('ok', e);
|
|
|
- }
|
|
|
+ const handleOk = debounce(
|
|
|
+ (e: Event) => {
|
|
|
+ emit('ok', e);
|
|
|
+ },
|
|
|
+ 200,
|
|
|
+ { leading: true, trailing: false },
|
|
|
+ );
|
|
|
|
|
|
function handleHeightChange(height: string) {
|
|
|
emit('height-change', height);
|