• BootStrap Table


    1.使用bootstraptable V4 版的Api,使用的jquery版本必须是 jquery-1.10.2.min.js 及以上的

    否则,会有引发意想不到的bug

    bug1:后台传到前台的数据都是好的,格式也正确,但是表格的tbody标签里面就是不添加行,浏览器无任何报错。

    2.老版本(bootstraptable V3 版)的Api绑定数据,需要带上  data-response-handler="responseHandler" 属性,否则不显示数据

    新版(bootstraptable V4 版,bootstrap-table@1.18.3 )及之后的版本不需要此属性。

    3.Mvc中以PartialView+前台数据加载的方式(data-toggle="table")加载数据,汉化属性(data-locale="zh-CN")不生效,故需要使用JS加载的方式

    <table
        id="table"
        data-locale="zh-CN"
        data-height="660"
        data-pagination="true"
        data-search="true"
        data-search-align="left"
        data-search-highlight="true"
        data-search-on-enter-key="true"
        data-response-handler="responseHandler"
        data-url="/Business/ProduceManage/Biz_Sell_Produceshipping/LoadWeiKaiPanTask">
        <thead>
            <tr>
                <th data-field="操作" data-formatter="cmmdFormatWeiKaiPan">操作</th>
                <th data-field="任务编号">任务编号</th>
                <th data-field="单位名称">单位名称</th>
                <th data-field="工程名称">工程名称</th>
                <th data-field="施工部位">施工部位</th>
                <th data-field="任务方量">任务方量</th>
                <th data-field="浇筑方式">浇筑方式</th>
                <th data-field="标号全称">标号全称</th>
                <th data-field="要求发货时间">要求发货时间</th>
                <th data-field="ID" data-visible="false">ID</th>
            </tr>
        </thead>
    </table>
    View Code
    $.extend($.fn.bootstrapTable.defaults, {
         data_locale: 'zh-CN'
    });
    $('#table').bootstrapTable();
    View Code

    4.

  • 相关阅读:
    SP笔记:交叉实现七行并成一行
    HTML tag 学习
    操作哈希表
    Efficient bipedal robots based on passivedynamic walkers
    Pushing People Around
    ZEROMOMENT PONTTHIRTY FIVE YEARS OF ITS LIFE

    Active Learning for RealTime Motion Controllers
    Accelerometerbased User Interfaces for the Control of a Physically Simulated Character
    Dynamic Response for Motion Capture Animation
  • 原文地址:https://www.cnblogs.com/sky-gfan/p/14532720.html
Copyright © 2020-2023  润新知