From b48a893614ed64944e3ad13399abfe5d6b24ee81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Mon, 2 Jan 2023 06:06:27 +0800 Subject: [PATCH] chore: rename emit function --- components/command/CommandItem.vue | 4 ++-- components/common/CommonAlert.vue | 6 +++--- components/common/CommonCropImage.vue | 4 ++-- components/nav/NavBottomMoreMenu.vue | 4 ++-- components/user/UserSwitcher.vue | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/command/CommandItem.vue b/components/command/CommandItem.vue index 149b2955..4f9351b1 100644 --- a/components/command/CommandItem.vue +++ b/components/command/CommandItem.vue @@ -1,7 +1,7 @@ diff --git a/components/common/CommonCropImage.vue b/components/common/CommonCropImage.vue index 7b6db87c..adee86d6 100644 --- a/components/common/CommonCropImage.vue +++ b/components/common/CommonCropImage.vue @@ -16,11 +16,11 @@ const props = withDefaults(defineProps(), { stencilSizePercentage: 0.9, }) -const emits = defineEmits<{ +const emit = defineEmits<{ (event: 'update:modelValue', value: File): void }>() -const vmFile = useVModel(props, 'modelValue', emits, { passive: true }) +const vmFile = useVModel(props, 'modelValue', emit, { passive: true }) const cropperDialog = ref(false) diff --git a/components/nav/NavBottomMoreMenu.vue b/components/nav/NavBottomMoreMenu.vue index aab9481f..05b64c5e 100644 --- a/components/nav/NavBottomMoreMenu.vue +++ b/components/nav/NavBottomMoreMenu.vue @@ -2,10 +2,10 @@ const props = defineProps<{ modelValue?: boolean }>() -const emits = defineEmits<{ +const emit = defineEmits<{ (event: 'update:modelValue', value: boolean): void }>() -const visible = useVModel(props, 'modelValue', emits, { passive: true }) +const visible = useVModel(props, 'modelValue', emit, { passive: true }) const colorMode = useColorMode() function changeShow() { diff --git a/components/user/UserSwitcher.vue b/components/user/UserSwitcher.vue index 1a806fe9..17a1e698 100644 --- a/components/user/UserSwitcher.vue +++ b/components/user/UserSwitcher.vue @@ -1,7 +1,7 @@