表格

结构

表格模板_components/table.html包括dataexpandcols三个参数。


expand传入扩展的样式名
cols传入<col /><col style="width: 20%" />字符串


时间 流水号 类型 付款方 金额 状态 可提现时间
2015-05-25 10:25:36 DOBA201506060000118000011 充值 建设银行 | 尾号 8435 422,252.00 可提现 2015-05-25
2015-05-25 10:25:36 DOBA201506060000118000011 充值 建设银行 | 尾号 8435 422,252.00 可提现 2015-05-25
    
# 定义面包屑数组 #
{%
    set data = {
        thead: ["时间","流水号","类型","付款方","金额","状态","可提现时间"],
        items: [
            ["2015-05-25   10:25:36", "DOBA201506060000118000011", "充值", "建设银行 |  尾号 8435 ", "422,252.00", "可提现 ", "2015-05-25 "],
            ["2015-05-25   10:25:36", "DOBA201506060000118000011", "充值", "建设银行 |  尾号 8435 ", "422,252.00", "可提现 ", "2015-05-25 "]
        ]
    }
%}
{% import "_components/table.html" as table %}
{{ table.render(data) }}
    

expand 样式扩展

expand扩展样式,比如传入inverse

时间 流水号 类型 付款方 金额 状态 可提现时间
2015-05-25 10:25:36 DOBA201506060000118000011 充值 建设银行 | 尾号 8435 422,252.00 可提现 2015-05-25
2015-05-25 10:25:36 DOBA201506060000118000011 充值 建设银行 | 尾号 8435 422,252.00 可提现 2015-05-25
    
# 定义面包屑数组 #
{%
    set data = {
        thead: ["时间","流水号","类型","付款方","金额","状态","可提现时间"],
        items: [
            ["2015-05-25   10:25:36", "DOBA201506060000118000011", "充值", "建设银行 |  尾号 8435 ", "422,252.00", "可提现 ", "2015-05-25 "],
            ["2015-05-25   10:25:36", "DOBA201506060000118000011", "充值", "建设银行 |  尾号 8435 ", "422,252.00", "可提现 ", "2015-05-25 "]
        ]
    }
%}
{% import "_components/table.html" as table %}
{{ table.render(data, "inverse") }}
    

表格标题

titlebtnsexpand

表格标题
    
{% import "_components/table.html" as table %}
{{ table.title("表格标题", "<a href="javascript:void(0);">XLS格式</a><a href="javascript:void(0);">CSV格式</a><a href="javascript:void(0);">批量打印凭证</a>") }}
{{ table.title("表格标题", "<a href="javascript:void(0);">更多 >></a>", expand="margin-top-20px") }}