chore: rename emit function

pull/685/head
三咲智子 2023-01-02 06:06:27 +08:00
rodzic 72e03f8109
commit b48a893614
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 69992F2250DFD93E
5 zmienionych plików z 11 dodań i 11 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { ResolvedCommand } from '@/composables/command'
const emits = defineEmits<{
const emit = defineEmits<{
(event: 'activate'): void
}>()
@ -21,7 +21,7 @@ const {
class="flex px-3 py-2 my-1 items-center rounded-lg hover:bg-active transition-all duration-65 ease-in-out cursor-pointer scroll-m-10"
:class="{ 'bg-active': active }"
:data-index="index"
@click="emits('activate')"
@click="emit('activate')"
>
<div v-if="cmd.icon" me-2 :class="cmd.icon" />

Wyświetl plik

@ -4,14 +4,14 @@ const props = withDefaults(defineProps<{
}>(), {
modelValue: true,
})
const emits = defineEmits<{
const emit = defineEmits<{
(e: 'update:modelValue', v: boolean): void
(event: 'close'): void
}>()
const visible = useVModel(props, 'modelValue', emits, { passive: true })
const visible = useVModel(props, 'modelValue', emit, { passive: true })
function close() {
emits('close')
emit('close')
visible.value = false
}
</script>

Wyświetl plik

@ -16,11 +16,11 @@ const props = withDefaults(defineProps<Props>(), {
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)

Wyświetl plik

@ -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() {

Wyświetl plik

@ -1,7 +1,7 @@
<script setup lang="ts">
import type { UserLogin } from '~/types'
const emits = defineEmits<{
const emit = defineEmits<{
(event: 'click'): void
}>()
@ -25,7 +25,7 @@ const switchUser = (user: UserLogin) => {
</script>
<template>
<div sm:min-w-80 max-w-100vw mxa py2 flex="~ col" @click="emits('click')">
<div sm:min-w-80 max-w-100vw mxa py2 flex="~ col" @click="emit('click')">
<template v-for="user of sorted" :key="user.id">
<button
flex rounded px4 py3 text-left