|
|
@@ -9,7 +9,7 @@
|
|
|
:data="props.tableData" :height="tableHeight" :max-height="maxHeight" table-layout="fixed" style="width: 100%;"
|
|
|
@selection-change="selectionChange" @select-all="selectAllChange" @cell-mouse-enter="handleMouseEnter"
|
|
|
@cell-mouse-leave="handleMouseLeave" :highlight-current-row="highlightCurrentRow"
|
|
|
- @current-change="currentChange" v-loading="loading">
|
|
|
+ @current-change="currentChange" v-loading="loading" :show-summary='props.showSummary'>
|
|
|
<!-- 空内容自定义 -->
|
|
|
<template #empty>
|
|
|
<div class="flex f-c a-c ">
|
|
|
@@ -120,6 +120,7 @@ interface Props{
|
|
|
highlightCurrentRow?: boolean,//是否可点击
|
|
|
showOperation?: boolean,//操作显示/隐藏
|
|
|
loading?:boolean,
|
|
|
+ showSummary?:boolean, //合计
|
|
|
columns: {
|
|
|
prop: string;
|
|
|
label: string;
|
|
|
@@ -187,7 +188,7 @@ function handleResize() {
|
|
|
const height = window.innerHeight;
|
|
|
// 在这里可以执行其他操作,比如更新某个元素的高度等
|
|
|
const tableElement = multipleTableRef.value?.$el as HTMLElement;
|
|
|
- if (tableElement) {
|
|
|
+ if (tableElement && !props.showSummary) {
|
|
|
const offsetTop = tableElement.offsetTop; // 获取 offsetTop
|
|
|
tableHeight.value = height - offsetTop - 230 + "px";
|
|
|
}
|