refactor(editor): Rename $emits to emits where we use defineEmits (no-changelog) (#9959)

This commit is contained in:
Ricardo Espinoza
2024-07-06 13:54:36 -04:00
committed by GitHub
parent d1821eba92
commit 1ae64ec4fb
18 changed files with 71 additions and 61 deletions

View File

@@ -84,7 +84,7 @@ const props = withDefaults(defineProps<DatatableProps>(), {
rowsPerPage: 10,
});
const $emit = defineEmits<{
const emit = defineEmits<{
'update:currentPage': [value: number];
'update:rowsPerPage': [value: number];
}>();
@@ -115,11 +115,11 @@ const classes = computed(() => ({
}));
function onUpdateCurrentPage(value: number) {
$emit('update:currentPage', value);
emit('update:currentPage', value);
}
function onRowsPerPageChange(value: number) {
$emit('update:rowsPerPage', value);
emit('update:rowsPerPage', value);
const maxPage = Math.ceil(totalRows.value / value);
if (maxPage < props.currentPage) {