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