Skip to content

Commit

Permalink
style: fix typing and use strict equal
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Sep 11, 2023
1 parent 542dd65 commit 3c8531b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/result-table/Validation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ const props = defineProps<{
:label="key"
>
<template #default>
<n-text v-if="key == 'time'">
{{ new Date(value as string).toLocaleString() }}
<n-text v-if="key === 'time'">
{{ new Date(props.plugin[key]).toLocaleString() }}
</n-text>
<n-text
v-else-if="['string', 'boolean', 'number'].includes(typeof value)"
>{{ value?.toString() }}</n-text
>
<n-tag
v-for="(tag, index) in props.plugin.tags"
v-else-if="key == 'tags'"
v-else-if="key === 'tags'"
:key="index"
size="small"
class="mr-1"
Expand All @@ -61,7 +61,7 @@ const props = defineProps<{
</n-tag>
<n-tag
v-for="adapter in props.plugin.supported_adapters || ['所有/未标记']"
v-else-if="key == 'supported_adapters'"
v-else-if="key === 'supported_adapters'"
:key="adapter"
size="small"
class="mr-1"
Expand Down

0 comments on commit 3c8531b

Please sign in to comment.