Skip to content

Commit 7d706fe

Browse files
committed
chore: update code to Vue 3
Signed-off-by: Maksim Sukharev <[email protected]>
1 parent b52fb3d commit 7d706fe

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/components/LogDetailsModal.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
size="large"
1010
:has-previous="index > 0"
1111
:has-next="index < logEntries.length - 1"
12-
@next="$emit('update:currentEntry', logEntries[index + 1])"
13-
@previous="$emit('update:currentEntry', logEntries[index - 1])"
14-
@update:show="$emit('update:open', false)">
12+
@next="emit('update:currentEntry', logEntries[index + 1])"
13+
@previous="emit('update:currentEntry', logEntries[index - 1])"
14+
@update:show="emit('update:open', false)">
1515
<template #default>
1616
<div class="log-details">
1717
<dl :class="cssLevelClass">
@@ -82,6 +82,11 @@ const props = defineProps<{
8282
logEntries: readonly ILogEntry[]
8383
}>()
8484
85+
const emit = defineEmits<{
86+
(event: 'update:currentEntry', value: ILogEntry): void
87+
(event: 'update:open', value: false): void
88+
}>()
89+
8590
hljs.registerLanguage('json', json)
8691
8792
const { formatTime, formatLogEntry } = useLogFormatting()

src/components/table/LogTableRow.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</td>
4848
<td>
4949
<NcActions placement="left-start">
50-
<NcActionButton close-after-click @click="$emit('show-details', row)">
50+
<NcActionButton close-after-click @click="emit('show-details', row)">
5151
<template #icon>
5252
<IconViewList />
5353
</template>
@@ -100,6 +100,10 @@ const props = withDefaults(
100100
},
101101
)
102102
103+
const emit = defineEmits<{
104+
(event: 'show-details', value: ILogEntry): void
105+
}>()
106+
103107
const settingsStore = useSettingsStore()
104108
const isRawDate = computed(() => settingsStore.dateTimeFormat === 'raw')
105109
const isRelativeDate = computed(() => settingsStore.dateTimeFormat === 'relative')

0 commit comments

Comments
 (0)