elemet-paging
<template>
<card-layout :title="L('Prosuct')" :actions="actions" @click="handleClick">
<el-table :data="tableData4.slice((currentPage-1) * pagesize,currentPage*pagesize)" style="width: 100%" max-height="">
<el-table-column fixed prop="date" label="日期" width="">
</el-table-column>
<el-table-column prop="name" label="姓名" width="">
</el-table-column>
<el-table-column prop="province" label="省份" width="">
</el-table-column>
<el-table-column prop="city" label="市区" width="">
</el-table-column>
<el-table-column prop="address" label="地址" width="">
</el-table-column>
<el-table-column prop="zip" label="邮编" width="">
</el-table-column>
<el-table-column fixed="right" label="操作" width="">
<template slot-scope="scope">
<el-button type="danger" @click.native.prevent="deleteRow(scope.$index, tableData4)" size="small">
移除
</el-button>
<el-button type="primary" size="small">
编辑
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[5, 10, 20, 40]" :page-size="pagesize" layout="total, sizes, prev, pager, next, jumper" :total="tableData4.length">
</el-pagination>
</card-layout>
</template> <script>
export default {
methods: {
deleteRow(index, rows) {
rows.splice(index, );
}
},
data() {
return {
tableData4: [
],
actions: [
[
{
id: "New",
type: "primary",
text: "New",
icon: "el-icon-circle-plus-outline"
},
{
id: "Refresh",
type: "success",
text: "Refresh",
icon: "fa fa-refresh"
}
]
],
currentPage: , //初始页
pagesize: , // 每页的数据
};
},
methods: {
handleClick(id) {
switch (id) {
case "New":
this.AddProduct();
break;
case "Refresh":
this.Refresh();
break;
default:
break;
}
},
deleteRow(index, rows) {
rows.splice(index, );
},
AddProduct() {
console.log("add");
},
Refresh() {
console.log("refresh");
},
handleSizeChange(size) {
this.pagesize = size;
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage;
}
}
};
</script>
elemet-paging的更多相关文章
- SQL Server 内存和Paging
一,内存term VAS:Virtual Address Space,是App能够申请访问的最大地址空间. Physical Memory:对SQL Server 来说,频繁访问的数据对象长时间驻留在 ...
- LINQ to SQL语句(9)之Top/Bottom和Paging和SqlMethods
适用场景:适量的取出自己想要的数据,不是全部取出,这样性能有所加强. Take 说明:获取集合的前n个元素:延迟.即只返回限定数量的结果集. var q = ( from e in db.Employ ...
- Lind.DDD.Paging分页模块介绍
回到目录 分页组件网上有很多,MVC.Pager,JSPager等,通过实现方式大体分为前端分页和后端分页,前端分页是前台对list内存本地集合进行分页,缺点就是在大数据情况下,内存占用过高:后端分页 ...
- ADDM Reports bug:Significant virtual memory paging was detected on the host operating system
查看ADDM(数据库版本为ORACLE 10.2.0.5.0)报告时,发现其中有个结论非常不靠谱:Significant virtual memory paging was detected on t ...
- [转载]ExtJs4 笔记(12) Ext.toolbar.Toolbar 工具栏、Ext.toolbar.Paging 分页栏、Ext.ux.statusbar.StatusBar 状态栏
作者:李盼(Lipan)出处:[Lipan] (http://www.cnblogs.com/lipan/)版权声明:本文的版权归作者与博客园共有.转载时须注明本文的详细链接,否则作者将保留追究其法律 ...
- Web Pages - Efficient Paging Without The WebGrid
Web Pages - Efficient Paging Without The WebGrid If you want to display your data over a number of p ...
- WebGrid with filtering, paging and sorting 【转】
WebGrid with filtering, paging and sorting by Jose M. Aguilar on April 24, 2012 in Web Development A ...
- The storage wars: Shadow Paging, Log Structured Merge and Write Ahead Logging
The storage wars: Shadow Paging, Log Structured Merge and Write Ahead Logging previous: Seek, and yo ...
- 重写 Ext.toolbar.Paging 扩展功能
直接代码,放项目overrides文件夹中即可 //重写类 分页插件 //汉化 //默认下方布局 //默认显示额外信息 //当删除数据时,处理页面变化 Ext.define("overrid ...
- SharePoint 2010 External List Paging – Server Side
http://lightningtools.com/bcs/sharepoint-2010-external-list-paging-server-side/ When you are using a ...
随机推荐
- INTERVAL
select sysdate - interval '10' day as "10天前", sysdate - interval '10' hour as " ...
- LostRoutes项目日志——编辑project.json
第一个Scene编译后运行会报错: Uncaught TypeError: Cannot read property 'style' of null 这是因为没有在project.json中包含已经编 ...
- Linux内核 设备树操作常用API
Linux设备树语法详解一文中介绍了设备树的语法,这里主要介绍内核中提供的操作设备树的API,这些API通常都在"include/of.h"中声明. device_node 内核中 ...
- web站点健康检测和告警小脚本
#!/bin/sh web01="http://172.18.52.xx:8080/web/api/getTime" web02="http://172.18.52.xx ...
- java连接数据库的基本操作
ResultSet保存查询的table数据,就像mysql的客户端显示的查询类容,但这中间还是藏有很多信息.
- rest_framework框架
rest_framework框架的认识 它是基于Django的,帮助我们快速开发符合RESTful规范的接口框架. 一 路由 可以通过路由as_view()传参 根据请求方式的不同执行对应不同的方法 ...
- get_or_create函数
get_or_create函数比较好用. 如果查询到就返回,如果没查询到就向数据库加入新的对象. e.g. size = Size.objects.get_or_create(sizeName=siz ...
- day_6.5 py
Wireshark的使用 2018-6-5 20:16:05 明天学 03
- 浏览器下载Excel,直接打开显示乱码...
情景: 浏览器中点击下载文件有两个选项:[打开][下载] [打开]之后,提示["文件.xlsx"的文件格式和扩展名不匹配.文件可能已损坏或不安全.除非您信任其来源,否则请勿打开.是 ...
- DataProtection设置问题引起不同ASP.NET Core站点无法共享用户验证Cookie
这是这两天ASP.NET Core迁移中遇到的一个问题.2个ASP.NET Core站点(对应于2个不同的ASP.NET Core Web应用程序),2个站点都可以登录,但在其中任1个站点登录后,在当 ...