<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                > 最常用的列表輸出, 這里提供一個參考案例, 具體項目可就該對應的dom結構 ## 控制器代碼 ``` <?php // 總頁數 $view->assign('pagecount', 100); // 模擬用戶列表 $data = [ 'title' => 'Hello PHP Angular', 'list' => [ ['id' => 1, 'name' => 'user_1', 'email' => 'email_1@qq.com', 'status' => 1], ['id' => 2, 'name' => 'user_2', 'email' => 'email_2@qq.com', 'status' => 0], ['id' => 3, 'name' => 'user_3', 'email' => 'email_3@qq.com', 'status' => -1], ['id' => 4, 'name' => 'user_4', 'email' => 'email_4@qq.com', 'status' => 1], ['id' => 5, 'name' => 'user_5', 'email' => 'email_5@qq.com', 'status' => 1], ], ]; // 向模板引擎設置數據 $view->assign($data); // 解析顯示 $view->display('index'); ``` ## 模板文件 ``` <!DOCTYPE html> <html> <head> <title>列表</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css" /> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <script type="text/javascript" src="http://apps.bdimg.com/libs/bootstrap/3.3.4/js/bootstrap.min.js"></script> </head> <body> <table class="table table-bordered"> <tr> <th>編號</th> <th>用戶名</th> <th>郵箱</th> <th>狀態</th> <th>操作</th> </tr> <tr php-if="$list" php-repeat="$list as $user"> <td>{$user.id}</td> <td>{$user.name}</td> <td>{$user.email}</td> <td> <php php-switch="$user['status']"> <span php-case="1">正常</span> <span php-case="0">已禁用</span> <span php-case="-1">已刪除</span> </php> </td> <td> <a php-show="$user['status'] === 1" php-after="echo ' '" href="javascript:void(0);" class="btn btn-xs btn-warning">禁用</a> <a php-show="$user['status'] === 0" php-after="echo ' '" href="javascript:void(0);" class="btn btn-xs btn-primary">啟用</a> <a php-show="$user['status'] >= 0" php-after="echo ' '" href="javascript:void(0);" class="btn btn-xs btn-danger">刪除</a> <a php-show="$user['status'] == -1" php-after="echo ' '" href="javascript:void(0);" class="btn btn-xs btn-primary">恢復</a> </td> </tr> <tr php-else=""> <td colspan="3" class="text-center">沒有數據</td> </tr> </table> </body> </html> ``` ## 最終效果 ![](https://box.kancloud.cn/2016-05-05_572a316adfe34.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看