首页 > 编程语言 > 详细

layui-数据表格排序

时间:2021-09-02 06:07:25      阅读:18      评论:0      收藏:0      [点我收藏+]

代码示例

见initSort方法


    function useTable(table) {
        table.render({
            elem: ‘#test‘
            // ,url:"{:url(‘admin/statistical/order_num‘)}"
            , cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
            , cols: [[
                {field: ‘statistical_date‘, width: 200, title: ‘时间‘}
                , {field: ‘turnover‘, width: 200, title: ‘销售额‘}
                , {field: ‘play_type_count‘, width: 200, title: ‘微信支付‘}
                , {field: ‘invalid_order_count‘, width: 200, title: ‘作废额度‘}
                , {field: ‘packing_amount‘, width: 200, title: ‘打包费‘}
                , {field: ‘shipping_fee‘, width: 200, title: ‘外送费‘}
                , {field: ‘coupon_amount‘, width: 200, title: ‘优惠卷金额‘}
                , {field: ‘reduce_amount‘, width: 300, title: ‘新客立减金额‘}
            ]],
            data: information, page: true,
            initSort: {
                field: ‘statistical_date‘, 需要排序的字段
                type: ‘desc‘ 排序方式
            }
        });
    }

layui-数据表格排序

原文:https://www.cnblogs.com/yaoliuyang/p/15209784.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!