diff --git a/web/src/components/table/tokens/TokensColumnDefs.js b/web/src/components/table/tokens/TokensColumnDefs.js index 0c1f966e..ffa5ff79 100644 --- a/web/src/components/table/tokens/TokensColumnDefs.js +++ b/web/src/components/table/tokens/TokensColumnDefs.js @@ -124,20 +124,20 @@ const renderStatus = (text, record, manageToken, t) => { ); - if (record.unlimited_quota) { - return content; - } + const tooltipContent = record.unlimited_quota ? ( +
+
{t('已用额度')}: {renderQuota(used)}
+
+ ) : ( +
+
{t('已用额度')}: {renderQuota(used)}
+
{t('剩余额度')}: {renderQuota(remain)} ({percent.toFixed(0)}%)
+
{t('总额度')}: {renderQuota(total)}
+
+ ); return ( - -
{t('已用额度')}: {renderQuota(used)}
-
{t('剩余额度')}: {renderQuota(remain)} ({percent.toFixed(0)}%)
-
{t('总额度')}: {renderQuota(total)}
- - } - > + {content} );