fix tabel 导出
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user