fix: add default value to format selector

This commit is contained in:
Lykin 2025-01-08 16:44:28 +08:00
parent 1c322fdac5
commit 19c8368dff
1 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ const onDecodeMenu = (key) => {
:icon="Code" :icon="Code"
:options="formatTypeOption" :options="formatTypeOption"
:tooltip="$t('interface.view_as')" :tooltip="$t('interface.view_as')"
:value="props.format" :value="props.format || formatTypes.RAW"
@update:value="(f) => onFormatChanged(props.decode, f)" /> @update:value="(f) => onFormatChanged(props.decode, f)" />
<n-divider vertical /> <n-divider vertical />
<dropdown-selector <dropdown-selector
@ -103,7 +103,7 @@ const onDecodeMenu = (key) => {
:menu-option="decodeMenuOption" :menu-option="decodeMenuOption"
:options="decodeTypeOption" :options="decodeTypeOption"
:tooltip="$t('interface.decode_with')" :tooltip="$t('interface.decode_with')"
:value="props.decode" :value="props.decode || decodeTypes.NONE"
@menu="onDecodeMenu" @menu="onDecodeMenu"
@update:value="(d) => onFormatChanged(d, '')" /> @update:value="(d) => onFormatChanged(d, '')" />
</n-space> </n-space>