antd vue实现table的分页组件固定位置的效果

时间:2025-03-09 07:11:05
//隐藏默认的分页 //:scroll="{ y: tableHeight, x: 1000 }" 自动计算表格的相对高度 <!-- {{ tableHeight }} --> <a-table ref="tableRef" :loading="loading" rowKey="id" :columns="columns" :data-source="tableData" :scroll="{ y: tableHeight, x: 1000 }" :pagination="false" bordered :row-selection="rowSelection"> <template #bodyCell="{ column, record }"> <template v-if=" === 'action'"> <span> <a-button type="link" @click="editeHandle()" :disabled="">编辑</a-button> <a-divider type="vertical" /> <!-- <a @click="delHandle(,1)">删除</a> --> <a-popconfirm title="确定删除这条数据吗?" :disabled="" ok-text="确认" cancel-text="取消" @confirm="delHandle()" @cancel="cancel"> <a-button type="link" href="#" :disabled="">删除</a-button> </a-popconfirm> <a-divider type="vertical" /> <a-button type="link" @click="getDetail()"> 查看详情 </a-button> </span> </template> </template> </a-table> <div class="footer-p"> <a-pagination v-bind="pagination" @change="handleTableChangePage" :showSizeChange="handleSizeChange" /> </div>