fix tabel 导出

This commit is contained in:
Theluyuan 2023-10-25 11:21:42 +08:00
parent 203b787876
commit 7859897c84
8 changed files with 42 additions and 24 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -35,6 +35,7 @@ export interface TableRowProps {
expandKeys: Recordable[];
getCheckboxProps: Function;
getRadioProps: Function;
page?: Recordable;
}
const slot = useSlots();
@ -473,8 +474,12 @@ const radioProps = props.getRadioProps(props.data, props.index);
:type="expandIconType"
@click="handleExpand"
></lay-icon>
{{ index + 1 }}
<template v-if="page">
{{ index + 1 + ((page.total - 1) * page.limit) }}
</template>
<template v-else>
{{ index + 1 }}
</template>
</td>
</template>
</template>

View File

@ -400,7 +400,7 @@ const exportData = () => {
}
tableStr += "</tr>";
}
datalist.value.forEach((item, rowIndex) => {
tableDataSource.value.forEach((item, rowIndex) => {
tableStr += "<tr>";
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
Object.keys(item).forEach((name) => {
@ -1094,6 +1094,7 @@ window.addEventListener("click", heddin);
@row="rowClick"
@row-double="rowDoubleClick"
@row-contextmenu="rowContextmenu"
:page="page"
>
<template v-for="name in slotsData" #[name]="{ data }">
<slot :name="name" :data="data"></slot>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long