Layui table 初始化


 

        table.render({
            elem: '#LAY-app-content-tags'
            , url: "/api/services/app/BimAttribute/GetAllForLayui"
            , parseData: function (res) {//自定義解析返回的數據
                return {
                    "code": res.success, //解析接口狀態
                    "msg": res.error, //解析提示文本
                    "count": res.result.count, //解析數據長度
                    "data": res.result.data //解析數據列表
                };
            }
            , limit: 10
            , limits: [10, 20, 30]
            , cols: [[
                { field: 'id', title: 'ID', hide: false }
                , { field: 'componentCode', title: app.localize("ComponentCode"), sort: true }
                , { field: 'concretValue', title: app.localize("ConcretValue") }
                , { field: 'identifier', title: app.localize("Identifier"), sort: true }               
            ]]
            , page: true
            , response: {
                statusCode: true //規定成功的狀態碼,默認:0
            }
        });

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM