由于我的是公共引入样式表和css表所以,将公共的也写出来了(我接手的项目为基于vue开发的)

公共的index.html

引入js

<script src="{MODULE_URL}static/js/modify.js" type="text/javascript" charset="utf-8"></script>
{MODULE_URL}static/在我的项目下都是这么写的,无论样式表还是css样式表
引入样式表
<link rel="stylesheet" type="text/css" href="{MODULE_URL}static/css/purchase.css?v=2019042001" />
 
vue的路由js配置页面的js路由(router.js)
,{
                path:"/PurchaseRecords",
                component:PurchaseRecords
   }
 新建一个js文件命名
const PurchaseRecords = {
    template: `
    <div class="demo">
        <div class="content" style="height:auto;">
            <div class="purchaserecords">
                <p>购买记录</p>
            </div>
            <div class="info">
                <input class="daochu"@click="" type="button" value="导出所有参与用户"/>
            <div class="title" style="margin-left: 24px;margin-top: 32px;">
                <div class="container_table">
                        <el-table :data="lists.slice((currentPage-1)*pagesize,currentPage*pagesize)" stripe style="width: 100%;border:none;" :default-sort="{prop: 'date', order: 'descending'}">
                                <el-table-column prop="userImg" label="用户头像"></el-table-column>
                                <el-table-column prop="lusername" label="昵称"></el-table-column>
                                <el-table-column prop="realname" label="真实姓名"></el-table-column>
                                <el-table-column prop="telnum" label="手机号"></el-table-column>
                                <el-table-column prop="conum" label="订单号"></el-table-column>
                                <el-table-column prop="hongb" sortable label="收到红包总金额"></el-table-column>
                                <el-table-column prop="bmtime" sortable label="报名时间"></el-table-column>
                                <el-table-column prop="downtime" sortable label="下单时间"></el-table-column>
                                <el-table-column label="操作">
                                    <template slot-scope="scope">
                                        <el-button type="danger" v-if="istag" @click=''>删除</el-button>
                                    <!-- <el-button type="primary" icon="el-icon-star-on" v-if="istag" @click='switchChange'></el-button>
                                        <el-button type="primary" icon="el-icon-star-off" v-else="!istag" @click='switchChange'></el-button>-->
                                    </template>
                                </el-table-column>
                            </el-table>
        <!--分页显示的数字-->
                        <el-pagination class="fy" layout="prev, pager, next,total" @current-change="current_change" :total=total></el-pagination>
                </div>
            </div>
        </div>
    </div>
</div>`,
    data() {
        return {
                total:1000,//默认数据总数
                pagesize:10,//每页的数据条数
                currentPage:1,//默认开始页面
                istag: true,
                input:"",
                input21: '',
                lists: [
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    },
                    {
                        "userImg": "img",
                        "lusername": "南柯残梦",
                        "realname": "流SIR",
                        "telnum": "18626131234",
                        "conum": "2019042112120304586",
                        "hongb": "22",
                        "bmtime": "2019-04-21 12:12:12",
                        "downtime": "2019-04-21 12:12:12"
                    }
                ]
                ,
                tableData:[]
            };
        } ,
                methods: {
                    tableRowClassName({row, rowIndex}) {
                        if (rowIndex === 0) {
                            return 'th';
                        }
                        return '';
                    },
                    switchChange(){
                        this.istag = !this.istag ;
                    },
                    created:function(){
                        this.total=this.lists.length;
                    },
                    current_change:function(currentPage){
                        this.currentPage = currentPage;
                    }
                }
}
数据为写死的data
效果为上图
样式表
.el-table td, .el-table th.is-leaf{
border: none !important;
color:black;
}
.el-table--striped .el-table__body tr.el-table__row--striped td{
background-color:#fff;
}
.el-table th>.cell{
font-size:16px !important;
}
.el-table::before{
height: 0px !important;
}
.fy{
margin-top: 25px;
height: 58px;
text-align: center;
}
.el-pager li.active+li {
border-left:1px !important;
}
 
 

vue加elementui开发的分页显示的更多相关文章

  1. elementui el-table根据分页显示表格序号

    每页显示的序号都是一样的: <el-table :data="tableData" highlight-current-row @current-change="h ...

  2. 小程序和Vue利用swiper实现icons分页显示--动态计算

    这里发现小程序实现步骤,Vue与之类似 先上效果图: <view class="icons"> <swiper indicator-dots="true ...

  3. vue、element-ui开发技巧

    1.vue下input文本框获得光标 html: <el-input size="mini" clearable v-model.trim="addOrEditDa ...

  4. vue结合element-ui table本地分页

    <template> <el-table :data="tableData1.slice((start1-1)*length1,start1*length1)" ...

  5. 关于vue+element-ui项目的分页,返回默认显示第一页的问题解决

    关于vue+element-ui项目的分页,返回默认显示第一页的问题解决     问题描述 当前页面如下: 然后点击页码跳到第3页,然后在第三页点击页面链接跳转到新的页面 然后在新页面点击返回按钮,返 ...

  6. 手把手教你使用Vue/React/Angular三大框架开发Pagination分页组件

    DevUI是一支兼具设计视角和工程视角的团队,服务于华为云DevCloud平台和华为内部数个中后台系统,服务于设计师和前端工程师.官方网站:devui.designNg组件库:ng-devui(欢迎S ...

  7. 循序渐进VUE+Element 前端应用开发(30)--- ABP后端和Vue+Element前端结合的分页排序处理

    在很多列表展示数据的场合中,大多数都会需要一个排序的处理,以方便快速查找排序所需的数据,本篇随笔介绍如何结合ABP后端和Vue+Element前端结合的分页排序处理过程. 1.Vue+Element前 ...

  8. vue修改elementUI的分页组件视图没更新问题

    转: vue修改elementUI的分页组件视图没更新问题 今天遇到一个小问题平时没留意,el-pagination这个分页组件有一个属性是current-page当前页.今天想在methods里面手 ...

  9. Electron+Vue+ElementUI开发环境搭建

    Node环境搭建 本文假定你完成了nodejs的环境基础搭建: 镜像配置(暂时只配置node包镜像源,部分包的二进制镜像源后续讨论).全局以及缓存路径配置,全局路径加入到了环境变量 $ node -v ...

随机推荐

  1. [UE4]Skeletal Mesh的碰撞体

    一.骨骼模型和骨骼碰撞体肯定不是完全吻合的,因为骨骼模型太复杂了. 二.骨骼碰撞体编辑在Physics Asset资源中 三.Constraints:只显示碰撞体 四.对于射击游戏来说,这样的碰撞体完 ...

  2. java.lang.Long 类源码解读

    总体阅读了Long的源码,基本跟Integer类类似,所以特别全部贴出源码,直接注释进行理解. // final修饰符 public final class Long extends Number i ...

  3. linux基础命令入门

    1.使用mkdir 创建目录mkdir $HOME/testFolder 2.使用cd命令切换目录cd $HOME/testFolder 3.使用 cd ../ 命令切换到上一级目录cd ../ 4. ...

  4. 错误 88 error C2248: “CObject::CObject”: 无法访问 private 成员(在“CObject”类中声明) c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxcoll.h 590

    最近接收了以前新公司遗留的代码,一个函数动不动就少的一千行,多的几千行,真是受不了这编码风格! 于是便使用了VS自带的重构工具,选择代码后右键-重构-提取方法,提取完方法就编译不过,想了好久原因,原来 ...

  5. React高级指引

    深入JSX 本质上来讲,JSX是为React.createElement方法提供的语法糖 <MyButton color=}> Click Me </MyButton> 编译为 ...

  6. Problem A: Apple(高斯消元)

    可以发现具有非常多的方程, 然后高斯消元就能85分 然而我们发现这些方程组成了一些环, 我们仅仅设出一部分变量即可获得N个方程, 就可以A了 trick 合并方程 #include <cstdi ...

  7. Tensorflow数学运算

    一.Tensor 之间的运算规则 1) 相同大小 Tensor 之间的任何算术运算都会将运算应用到元素级 2) 不同大小 Tensor(要求dimension 0 必须相同) 之间的运算叫做广播(br ...

  8. OSS RFC

    This is a very late reply, but just want to share the process of setting up all associated RFCs with ...

  9. (21/24) webpack实战技巧:webpack对三方类库的优化操作

    1.优化第一步--选用引入方式 在前面的学习中我们对于如何引入第三方类库(Jquery)推荐了两种方式,第一种是import引入的方式,第二种是ProvidePlugin插件.那两种引入方法有什么区别 ...

  10. 虚拟机Ubuntu18.04——gcc版本的升降

    致读者:这是本人第一篇博客,小试牛刀,希望能在以后的道路中分享出更多实用的技巧和知识,大家一起进步. 操作环境: VMware Workstation 14Pro .64位Ubuntu18.04系统 ...