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
efab41c4
authored
Mar 15, 2026
by
Seefs
Committed by
GitHub
Mar 15, 2026
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3233 from KiGamji/round-remaining-balance
Round remaining balance
parents
e4144d60
9fbb7822
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 @
efab41c4
...
...
@@ -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 @
efab41c4
...
...
@@ -1068,8 +1068,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
=
'¤'
;
...
...
@@ -1079,9 +1085,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