Skip to content

Commit b2b039d

Browse files
committed
fix(ui): vue table slot warnings
1 parent bbc68b9 commit b2b039d

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

ui/src/utils/metrics.ts

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export function buildVulnerabilityColumns(
220220
type: typeColors[row.type] || 'default',
221221
size: 'small',
222222
style: tagStyle
223-
}, { default: () => row.type })
223+
}, () => row.type)
224224

225225
// Show info icon for any finding with an analysis state
226226
if (row.analysisState) {
@@ -235,13 +235,11 @@ export function buildVulnerabilityColumns(
235235
h(NTooltip, {
236236
trigger: 'hover'
237237
}, {
238-
trigger: () => {
239-
return h(NIcon, {
240-
class: 'icons',
241-
size: 16,
242-
style: 'cursor: help; margin-left: 4px;'
243-
}, { default: () => h(Info20Regular) })
244-
},
238+
trigger: () => h(NIcon, {
239+
class: 'icons',
240+
size: 16,
241+
style: 'cursor: help; margin-left: 4px;'
242+
}, () => h(Info20Regular)),
245243
default: () => tooltipContent
246244
})
247245
])
@@ -311,13 +309,11 @@ export function buildVulnerabilityColumns(
311309
h(NTooltip, {
312310
trigger: 'hover'
313311
}, {
314-
trigger: () => {
315-
return h(NIcon, {
316-
class: 'icons',
317-
size: 16,
318-
style: 'cursor: help;'
319-
}, { default: () => h(Info20Regular) })
320-
},
312+
trigger: () => h(NIcon, {
313+
class: 'icons',
314+
size: 16,
315+
style: 'cursor: help;'
316+
}, () => h(Info20Regular)),
321317
default: () => severityTooltipContent
322318
})
323319
])
@@ -418,7 +414,7 @@ export function buildVulnerabilityColumns(
418414
options.onViewAnalysis(row)
419415
}
420416
}
421-
}, { default: () => h(Eye) })
417+
}, () => h(Eye))
422418

423419
return h('div', {}, [viewIcon])
424420
}

0 commit comments

Comments
 (0)