ant-vue中table自定义分页器
Posted 尔嵘
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ant-vue中table自定义分页器相关的知识,希望对你有一定的参考价值。
<a-table :columns="columns" :data-source="data" :scroll={y:80} :pagination="false" bordered style="overflow-y: hidden;margin: 0;padding: 0;">
<template slot="operation" slot-scope="text, record, index">
<div class="editable-row-operations">
<span v-if="record.editable">
<a @click="() => save(record.key)">Save</a>
<a-popconfirm title="Sure to cancel?" @confirm="() => cancel(record.key)">
<a>取消</a>
</a-popconfirm>
</span>
<span v-else>
<a :disabled="editingKey !== ''" @click="() => edit(record.key)">编辑</a>
</span>
</div>
</template>
<template slot="action" slot-scope="text, record, index">
<a style="color: #6c7fff;" @click="handleAddOrUpdateAlarmType(record, index)">编辑</a>
<a-divider v-if="record.key != 1 && record.key != 2 && record.key != 10" type="vertical"/>
<a style="color: #ff4967;" v-if="record.key != 1 && record.key != 2 && record.key != 10" @click="handleDeleteAlarmType(record, index)">删除</a>
</template>
</a-table>
<a-pagination
style="text-align: right; margin-top: 10px;"
v-model="page"
:page-size.sync="pageSize"
:page-size-options="pageSizeOptions"
@showSizeChange="handleShowSizeChange"
:total="total"
show-quick-jumper
show-size-changer
:show-total="(total, range) => `从${range[0]}到${range[1]} ,总共 ${total}`"
/>
以上是关于ant-vue中table自定义分页器的主要内容,如果未能解决你的问题,请参考以下文章