Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e5c93739
authored
May 24, 2025
by
Netfan
Committed by
GitHub
May 24, 2025
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: json-bigint parse used in vxeTable (#6271)
* 修复vxeTable不能加载json-bigint解析的数据的问题
1 parent
af186f87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
playground/src/api/request.ts
playground/src/api/request.ts
View file @
e5c9373
...
@@ -12,6 +12,7 @@ import {
...
@@ -12,6 +12,7 @@ import {
RequestClient
,
RequestClient
,
}
from
'@vben/request'
;
}
from
'@vben/request'
;
import
{
useAccessStore
}
from
'@vben/stores'
;
import
{
useAccessStore
}
from
'@vben/stores'
;
import
{
cloneDeep
}
from
'@vben/utils'
;
import
{
message
}
from
'ant-design-vue'
;
import
{
message
}
from
'ant-design-vue'
;
import
JSONBigInt
from
'json-bigint'
;
import
JSONBigInt
from
'json-bigint'
;
...
@@ -29,7 +30,9 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
...
@@ -29,7 +30,9 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
transformResponse
:
(
data
:
any
,
header
:
AxiosResponseHeaders
)
=>
{
transformResponse
:
(
data
:
any
,
header
:
AxiosResponseHeaders
)
=>
{
// storeAsString指示将BigInt存储为字符串,设为false则会存储为内置的BigInt类型
// storeAsString指示将BigInt存储为字符串,设为false则会存储为内置的BigInt类型
return
header
.
getContentType
()?.
toString
().
includes
(
'application/json'
)
return
header
.
getContentType
()?.
toString
().
includes
(
'application/json'
)
?
JSONBigInt
({
storeAsString
:
true
}).
parse
(
data
)
?
cloneDeep
(
JSONBigInt
({
storeAsString
:
true
,
strict
:
true
}).
parse
(
data
),
)
:
data
;
:
data
;
},
},
});
});
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment