mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
support export to tsv file
This commit is contained in:
+8
-2
@@ -214,8 +214,14 @@ export default {
|
||||
getUserDataStatistics: () => {
|
||||
return axios.get('v1/data/statistics.json');
|
||||
},
|
||||
getExportedUserData: () => {
|
||||
return axios.get('v1/data/export.csv');
|
||||
getExportedUserData: (fileType) => {
|
||||
if (fileType === 'csv') {
|
||||
return axios.get('v1/data/export.csv');
|
||||
} else if (fileType === 'tsv') {
|
||||
return axios.get('v1/data/export.tsv');
|
||||
} else {
|
||||
return Promise.reject('Parameter Invalid');
|
||||
}
|
||||
},
|
||||
clearData: ({ password }) => {
|
||||
return axios.post('v1/data/clear.json', {
|
||||
|
||||
Reference in New Issue
Block a user