Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9fbb7822
authored
Mar 12, 2026
by
KiGamji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Round displayed remaining balance values
parent
da8a52f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
web/src/components/table/channels/ChannelsColumnDefs.jsx
+6
-1
web/src/helpers/render.jsx
+9
-3
No files found.
web/src/components/table/channels/ChannelsColumnDefs.jsx
View file @
9fbb7822
...
...
@@ -537,7 +537,12 @@ export const getChannelsColumns = ({
</
Tag
>
</
Tooltip
>
<
Tooltip
content=
{
t
(
'剩余额度$'
)
+
record
.
balance
+
t
(
',点击更新'
)
}
content=
{
t
(
'剩余额度'
)
+
': '
+
renderQuotaWithAmount
(
record
.
balance
)
+
t
(
',点击更新'
)
}
>
<
Tag
color=
'white'
...
...
web/src/helpers/render.jsx
View file @
9fbb7822
...
...
@@ -1066,8 +1066,14 @@ export function renderQuotaWithAmount(amount) {
if
(
quotaDisplayType
===
'TOKENS'
)
{
return
renderNumber
(
renderUnitWithQuota
(
amount
));
}
const
numericAmount
=
Number
(
amount
);
const
formattedAmount
=
Number
.
isFinite
(
numericAmount
)
?
numericAmount
.
toFixed
(
2
)
:
amount
;
if
(
quotaDisplayType
===
'CNY'
)
{
return
'¥'
+
a
mount
;
return
'¥'
+
formattedA
mount
;
}
else
if
(
quotaDisplayType
===
'CUSTOM'
)
{
const
statusStr
=
localStorage
.
getItem
(
'status'
);
let
symbol
=
'¤'
;
...
...
@@ -1077,9 +1083,9 @@ export function renderQuotaWithAmount(amount) {
symbol
=
s
?.
custom_currency_symbol
||
symbol
;
}
}
catch
(
e
)
{}
return
symbol
+
a
mount
;
return
symbol
+
formattedA
mount
;
}
return
'$'
+
a
mount
;
return
'$'
+
formattedA
mount
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment