From 19c8368dff5b2eeca013191aae6a4492856a6ce0 Mon Sep 17 00:00:00 2001
From: Lykin <137850705+tiny-craft@users.noreply.github.com>
Date: Wed, 8 Jan 2025 16:44:28 +0800
Subject: [PATCH] fix: add default value to format selector
---
frontend/src/components/content_value/FormatSelector.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/src/components/content_value/FormatSelector.vue b/frontend/src/components/content_value/FormatSelector.vue
index 178b95b..2e59576 100644
--- a/frontend/src/components/content_value/FormatSelector.vue
+++ b/frontend/src/components/content_value/FormatSelector.vue
@@ -93,7 +93,7 @@ const onDecodeMenu = (key) => {
:icon="Code"
:options="formatTypeOption"
:tooltip="$t('interface.view_as')"
- :value="props.format"
+ :value="props.format || formatTypes.RAW"
@update:value="(f) => onFormatChanged(props.decode, f)" />
{
:menu-option="decodeMenuOption"
:options="decodeTypeOption"
:tooltip="$t('interface.decode_with')"
- :value="props.decode"
+ :value="props.decode || decodeTypes.NONE"
@menu="onDecodeMenu"
@update:value="(d) => onFormatChanged(d, '')" />