Skip to content

Commit

Permalink
releases 3.11.15
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 2, 2024
1 parent 700f8fa commit 0dab1ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "3.11.14",
"version": "3.11.15",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down
17 changes: 10 additions & 7 deletions packages/table/module/export/mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function toBooleanValue (cellValue: any) {
return XEUtils.isBoolean(cellValue) ? (cellValue ? 'TRUE' : 'FALSE') : cellValue
}

function getLabelData ($xetable: any, opts: any, columns: any[], datas: any[]) {
function getBodyLabelData ($xetable: any, opts: any, columns: any[], datas: any[]) {
const { isAllExpand, mode } = opts
const { treeConfig, treeOpts, radioOpts, checkboxOpts, columnOpts } = $xetable
const childrenField = treeOpts.children || treeOpts.childrenField
Expand Down Expand Up @@ -152,15 +152,18 @@ function getLabelData ($xetable: any, opts: any, columns: any[], datas: any[]) {
columns.forEach((column, $columnIndex) => {
let cellValue = ''
const renderOpts = column.editRender || column.cellRender
let exportLabelMethod = column.exportMethod
if (!exportLabelMethod && renderOpts && renderOpts.name) {
let bodyExportMethod = column.exportMethod
if (!bodyExportMethod && renderOpts && renderOpts.name) {
const compConf = renderer.get(renderOpts.name)
if (compConf) {
exportLabelMethod = compConf.tableExportMethod || compConf.exportMethod || (compConf as any).cellExportMethod
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod || (compConf as any).cellExportMethod
}
}
if (exportLabelMethod) {
cellValue = exportLabelMethod({ $table: $xetable, row, column, options: opts })
if (!bodyExportMethod) {
bodyExportMethod = columnOpts.exportMethod
}
if (bodyExportMethod) {
cellValue = bodyExportMethod({ $table: $xetable, row, column, options: opts })
} else {
switch (column.type) {
case 'seq': {
Expand Down Expand Up @@ -207,7 +210,7 @@ function getExportData ($xetable: any, opts: any) {
if (dataFilterMethod) {
datas = datas.filter((row: any, index: any) => dataFilterMethod({ row, $rowIndex: index }))
}
return getLabelData($xetable, opts, columns, datas)
return getBodyLabelData($xetable, opts, columns, datas)
}

function getBooleanValue (cellValue: any) {
Expand Down

0 comments on commit 0dab1ff

Please sign in to comment.