mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
perf: 优化 JSON 序列化无法处理函数的问题
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { canvasCut, downloadTextFile } from '@/utils'
|
||||
import { canvasCut, downloadTextFile, JSONStringify } from '@/utils'
|
||||
const chartEditStore = useChartEditStore()
|
||||
|
||||
// 导出
|
||||
@@ -9,9 +9,7 @@ export const exportHandle = () => {
|
||||
|
||||
// 导出数据
|
||||
downloadTextFile(
|
||||
JSON.stringify(chartEditStore.getStorageInfo || [], (k, v) => {
|
||||
return v === undefined ? null : v
|
||||
}),
|
||||
JSONStringify(chartEditStore.getStorageInfo || []),
|
||||
undefined,
|
||||
'json'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user