首页 > 其他分享 >AntDesignVue之a-bale

AntDesignVue之a-bale

时间:2022-09-28 15:14:49浏览次数:53  
标签:pagination pageNum pageSize AntDesignVue bale current queryParam change

a-table API描述。


参数 说明 类型
pagination 分页器,参考配置项或 pagination文档,设为 false 时不展示和进行分页 Object

说明pagination是个对象或false.如果是对象,需要按分页文档进行配置。

pagination文档说明

参数 说明 类型
current(v-model) 当前页数 number
pageSize(v-model) 每页条数 number

代码示例

<a-table v-if="$auth('authRole.list')"
	size="small"
	:columns="columns"
	:rowKey="record => record.id"
	:pagination="queryParam"
	:dataSource="table1DataSource"
	@change="change"
	>
	<span slot="serial" slot-scope="text, record, index">{{ queryParam.pageSize*(queryParam.pageNum-1)+index + 1 }}</span>
	<span slot="parentVersion" slot-scope="text, record, index">
	   上级<br/>版
	</span>
	<span slot="action" slot-scope="text, record">
		<a href="javascript:void(0);" @click="show(record)"">显示什么</a>
	</span>
</a-table>
//查询按钮
handleSearch() {
	this.queryParam.pageNum = 1;
	this.queryParam.current = 1;//重点
	this.query();
},

// 分页操作
change(pagination, filters, sorter) {
	this.queryParam.pageSize = pagination.pageSize;
	this.queryParam.pageNum = pagination.current;
	this.queryParam.current = pagination.current;//重点
	this.query();
},

标签:pagination,pageNum,pageSize,AntDesignVue,bale,current,queryParam,change
From: https://www.cnblogs.com/javaeye235/p/16738087.html

相关文章

  • vue——全局事件总线(GlobalEventBus)
    一.什么是全局事件总线?1.一种组件间通信的方式,适用于任意组件间通信。是根据VueComponent.prototype.__proto__=Vue.prototype的原理来进行全局引用二.全局事件总线......