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 ...
随机推荐
- 理解AppDomain
在传统的 Win32的程序中,进程是独立的运行空间, 在一些大型系统中, 通常都是将系统中的核心功能分解出来用独立的进程来处理,一方面是为了能获得更高的系统性能.吞吐量 .另一方面是为了能隔离功能之间 ...
- iOS - 让WKWebView 支持 NSURLProtocol
iOS8以后,苹果推出了新框架Webkit,提供了替换UIWebView的组件WKWebView.各种UIWebView的问题没有了,速度更快了,占用内存少了,一句话,WKWebView是App内部加 ...
- Android打印当前所有线程及对应栈信息
Map<Thread, StackTraceElement[]> threadMap = Thread.getAllStackTraces(); Log.e("albertThr ...
- 网络推送通知:及时,相关和准确 (navigator.serviceWorker.register(), window.PushManager, new Notification)
google网络推送通知 https://developers.google.cn/web/fundamentals/push-notifications/ 服务工作线程:简介server worle ...
- c语言中的左移和右移
先说左移,左移就是把一个数的所有位都向左移动若干位,在C中用<<运算符.例如: int i = 1;i = i << 2; //把i里的值左移2位 也就是说,1的2进制是00 ...
- Jexus 安装asp.net mvc EF 项目引发的错误总
1.Linux 中的文件路径问题(配置文件路径),必须使用左斜杆 “/” 2.MVC 看 View/Web.config 下的配置文件中版本不对报错,如下: Could not locate Razo ...
- 浅谈原生JavaScript实现remove()和recover()
利用原生JavaScript实现: 1.remove(selectors)删除指定的一个或一组元素. 2.recover(selectors)恢复刚才删除的元素. function remove(se ...
- Javascript:一些基本语法
便于日后复习快速回忆起来,把Javascript一些没那么普遍的语法特性写一写. Javascript作为三剑客的灵魂,我把它写在body里 <!DOCTYPE html> <htm ...
- deepin修改javahome不生效,一直显示openjdk解决
删除/usr/bin/java即可 terwer@terwer-PC:~$ sudo rm /usr/bin/java [sudo] terwer 的密码: terwer@terwer-PC:~$ j ...
- [hyperscan][pkg-config] hyperscan 从0到1路线图
经过一系列的研究学习,知识储备之后,终于,可以开始研究hyperscan了. [knowledge][模式匹配] 字符匹配/模式匹配 正则表达式 自动机 [knowledge][perl][pcre] ...