Просмотр исходного кода

Merge pull request #1181 from feitianbubu/fix-balance-unit-sync

fix: balance unit sync
Calcium-Ion 9 месяцев назад
Родитель
Сommit
d99cafbb09
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      web/src/components/table/ChannelsTable.js
  2. 1 1
      web/src/helpers/render.js

+ 2 - 2
web/src/components/table/ChannelsTable.js

@@ -256,7 +256,7 @@ const ChannelsTable = () => {
                     {renderQuota(record.used_quota)}
                     {renderQuota(record.used_quota)}
                   </Tag>
                   </Tag>
                 </Tooltip>
                 </Tooltip>
-                <Tooltip content={t('剩余额度') + record.balance + t(',点击更新')}>
+                <Tooltip content={t('剩余额度$') + record.balance + t(',点击更新')}>
                   <Tag
                   <Tag
                     color='white'
                     color='white'
                     type='ghost'
                     type='ghost'
@@ -265,7 +265,7 @@ const ChannelsTable = () => {
                     prefixIcon={<Coins size={14} />}
                     prefixIcon={<Coins size={14} />}
                     onClick={() => updateChannelBalance(record)}
                     onClick={() => updateChannelBalance(record)}
                   >
                   >
-                    ${renderNumberWithPoint(record.balance)}
+                    {renderQuotaWithAmount(record.balance)}
                   </Tag>
                   </Tag>
                 </Tooltip>
                 </Tooltip>
               </Space>
               </Space>

+ 1 - 1
web/src/helpers/render.js

@@ -854,7 +854,7 @@ export function renderQuotaWithAmount(amount) {
   if (displayInCurrency) {
   if (displayInCurrency) {
     return '$' + amount;
     return '$' + amount;
   } else {
   } else {
-    return renderUnitWithQuota(amount);
+    return renderNumber(renderUnitWithQuota(amount));
   }
   }
 }
 }