xs-common-plugins 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/package.json +1 -1
- package/src/common/common.js +4 -0
package/README.md
CHANGED
package/package.json
CHANGED
package/src/common/common.js
CHANGED
|
@@ -350,6 +350,10 @@ common.clone = (obj) => {
|
|
|
350
350
|
common.exportExcel = async (url, query, fileName = 'demo', headers = { responseType: 'arraybuffer' }) => {
|
|
351
351
|
let newQuery = JSON.parse(JSON.stringify(query))
|
|
352
352
|
delete newQuery.data
|
|
353
|
+
for (const key in newQuery) {
|
|
354
|
+
if(newQuery[key] == null || newQuery[key] === '')
|
|
355
|
+
delete newQuery[key]
|
|
356
|
+
}
|
|
353
357
|
const httpRequest = common.getObject(url)
|
|
354
358
|
const response = await httpRequest(newQuery, headers)
|
|
355
359
|
const blob = new Blob([response], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' })
|