fix type errors

This commit is contained in:
kakkokari-gtyih 2024-10-05 15:18:21 +09:00
parent 0a4e06fe52
commit 1479b9cb3e
2 changed files with 9 additions and 9 deletions

View File

@ -26,11 +26,11 @@ import { onMounted, onUnmounted, shallowRef, ref } from 'vue';
import MkModal from './MkModal.vue'; import MkModal from './MkModal.vue';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
withOkButton: boolean; withOkButton?: boolean;
withCloseButton: boolean; withCloseButton?: boolean;
okButtonDisabled: boolean; okButtonDisabled?: boolean;
width: number; width?: number;
height: number; height?: number;
}>(), { }>(), {
withOkButton: false, withOkButton: false,
withCloseButton: true, withCloseButton: true,

View File

@ -115,7 +115,7 @@ const decorationsForPreview = computed(() => {
}); });
function cancel() { function cancel() {
dialog.value.close(); dialog.value?.close();
} }
async function update() { async function update() {
@ -126,7 +126,7 @@ async function update() {
offsetY: offsetY.value, offsetY: offsetY.value,
showBelow: showBelow.value, showBelow: showBelow.value,
}); });
dialog.value.close(); dialog.value?.close();
} }
async function attach() { async function attach() {
@ -137,12 +137,12 @@ async function attach() {
offsetY: offsetY.value, offsetY: offsetY.value,
showBelow: showBelow.value, showBelow: showBelow.value,
}); });
dialog.value.close(); dialog.value?.close();
} }
async function detach() { async function detach() {
emit('detach'); emit('detach');
dialog.value.close(); dialog.value?.close();
} }
</script> </script>