Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vxe-table v3 表尾数据导出不完整 #28

Open
iFTY-R opened this issue Sep 11, 2023 · 0 comments
Open

vxe-table v3 表尾数据导出不完整 #28

iFTY-R opened this issue Sep 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@iFTY-R
Copy link

iFTY-R commented Sep 11, 2023

可复现的链接:

https://codesandbox.io/s/vxe-table-3-x-vue-2-6-wen-ti-yan-shi-forked-8gf5lk

问题描述与截图:

复现链接

点击导出按钮,下载下来的 xlxs ,表尾数据不完整

使用了这个插件,
"vxe-table-plugin-export-xlsx": "2.2.6",

gridOptions: {
        border: true,
        toolbarConfig: {
          export: true,
        },
        exportConfig: {
          filename: "demo",
          // 默认选中类型
          type: "xlsx",
          // 自定义类型
          types: ["xlsx", "csv", "html", "xml", "txt"],
          // mode: 'all',
          useStyle: true,
          isFooter: true,
          isColgroup: true,
        },
},

网页中:
image

导出后,footer 行,没显示完整 :
image

vxe-table v4 版本测试过了,没有这个问题,具体代码

我试着解决:
我修改了 vxe-table-plugin-export-xlsx 的 index.es6.js
发现

function getFooterCellValue($table, opts, rows, column) {
  const cellValue = getCellLabel(column, rows[$table.getVMColumnIndex(column)]);
  return cellValue;
}

将 getFooterCellValue 函数中的 getVMColumnIndex 换成 getVTColumnIndex 就解决了

期望的结果:

表尾数据可以导出完整

操作系统:

window10

浏览器版本:

114.0.5735.91

vue 版本:

2.7.0

vxe-table 版本:

3.6.17

@iFTY-R iFTY-R added the bug Something isn't working label Sep 11, 2023
@iFTY-R iFTY-R changed the title 当有表格分组时, vxe-table v3 表尾数据导出不完整 Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant