複数のデータテーブルを使用しfsLayuiPlugin

fsLayuiPluginが 共通のコンポーネントを提供するために、プラグlayui支持CRUD操作データテーブルの急速な発展に基づいて、設定HTML、JS遠位によるデータの要求は、開発作業の重複を減らします。
GitHubのダウンロード コードのダウンロードクラウド
テスト環境住所: http://fslayui.itcto.cn

複数のデータテーブルデータの単一のテーブルが類似しているが、不整合の詳細は、本発明のデータは、詳細な説明は、導入された差分のみを形成し、データの単一のテーブルを参照しない使用fsLayuiPluginデータテーブル

複数のデータテーブルとシングルテーブルデータの違いは?

データテーブルIDでの主な違いの嘘、データIDの種々の異なる形態、
あなたはマルチデータテーブルを実現したい場合は、データテーブルには、指定されたIDを失うことになる、すなわち TABLEID 、例えばbuttionボタンがTABLEIDプロパティに配置されました。あなたがデフォルトで設定されていない場合は TABLEID fsDatagridを 、データをレンダリングすることで動作するものではありません。

デモ

次のデモは、設定した TABLEIDを
<div class="layui-row grid-demo">
  <div class="layui-col-md12">
      <button class="layui-btn" function="top" topUrl="add.html" tableId="fsDatagrid2" topWidth="500px" topHeight="200px" topTitle="新增demo">
      <i class="layui-icon">&#xe654;</i>新增
    </button>
    <button class="layui-btn layui-btn-danger" function="submit" tableId="fsDatagrid2" url="/fsbus/1002" isSelect="1" isConfirm="1" confirmMsg="是否确定删除选中的数据?" inputs="id:">
      <i class="layui-icon">&#xe640;</i>删除
    </button>

    > <button class="layui-btn" function="refresh"
    ="fsDatagrid2">
      <i class="layui-icon">&#x1002;</i>刷新
    </button>
  </div>
  <div class="layui-col-md12">
     <table id="fsDatagrid2" lay-filter="fsDatagrid2" class="fsDatagrid" url="/fsbus/1000" isPage="1" defaultForm="query_form2" height="full-235"></table>
     <div class="fsDatagridCols">
        <p checkbox="true"/>
        <p field="id" title="ID" width="200" sort="true"/>
        <p field="name" title="名称" width="300" sort="true"/>
        <p field="createdTime" title="创建时间" width="180"/>
        <p field="modifiedTime" title="修改时间" width="180"/>
        <p fixed="right" align="center" toolbar="#barDemo2" title="操作" width="150"/>
    </div>
      <script type="text/html" id="barDemo2">
        <a class="layui-btn layui-btn-xs" lay-event="top" topUrl="edit.html" topWidth="500px" topHeight="200px" topTitle="编辑demo" inputs="id:">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="/fsbus/1002" isConfirm="1" confirmMsg="是否确定删除当前记录?" inputs="id:">删除</a>
    </script>
  </div>
</div>
この記事では、最初に私のブログに登場: ITCTOの技術のブログ

おすすめ

転載: www.cnblogs.com/baimeishaoxia/p/12068362.html