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 CHANGED
@@ -264,4 +264,8 @@
264
264
  1. common.js 增加 common.updateData() 修改数据后, 刷新列表页函数
265
265
  2. dic 字段, 移除 '0' 字符串 0 的 参数
266
266
  3. 移除 common.getReportList() 获取列表页数据 函数 空数据入参
267
+ ```
268
+ ```
269
+ 1.1.5
270
+ 1. common.js common.exportExcel (报表导出) 方法, 移除空条件
267
271
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xs-common-plugins",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "private": false,
5
5
  "description": "向上公共代码部分",
6
6
  "author": "祝玲云 <1902733517@qq.com>",
@@ -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' })