From 63f4595ef81c4e5d606e70bc7d6826331d307ec7 Mon Sep 17 00:00:00 2001 From: CaIon Date: Sat, 14 Mar 2026 17:05:44 +0800 Subject: [PATCH] feat: refactor billing display mode change handler in ColumnSelectorModal --- .../table/usage-logs/modals/ColumnSelectorModal.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/components/table/usage-logs/modals/ColumnSelectorModal.jsx b/web/src/components/table/usage-logs/modals/ColumnSelectorModal.jsx index ca1483db..1c450666 100644 --- a/web/src/components/table/usage-logs/modals/ColumnSelectorModal.jsx +++ b/web/src/components/table/usage-logs/modals/ColumnSelectorModal.jsx @@ -36,6 +36,10 @@ const ColumnSelectorModal = ({ showUserInfoFunc, t, }) => { + const handleBillingDisplayModeChange = (eventOrValue) => { + setBillingDisplayMode(eventOrValue?.target?.value ?? eventOrValue); + }; + const isTokensDisplay = typeof localStorage !== 'undefined' && localStorage.getItem('quota_display_type') === 'TOKENS'; @@ -73,7 +77,7 @@ const ColumnSelectorModal = ({ setBillingDisplayMode(value)} + onChange={handleBillingDisplayModeChange} > {isTokensDisplay ? t('价格模式') : t('价格模式(默认)')}