直播電商平臺開發,列太多,捲軸顯示

zhibo系統開發發表於2023-02-13

直播電商平臺開發,列太多,捲軸顯示

 

$("#jqGrid").jqGrid({
        url: '../app/list',
        datatype: "json",
        colModel: [
            {label: '企業名稱', name: 'company', width: 150, align:'center' },
            { label: '錄音檔案', name: "recording_file", width: 750, align:'center',
                formatter: function (value, options, row) {
                    if (isNull(value))  return "---";
                    var index = value.lastIndexOf("\/");
                    var flag = value.trim().substr(0, 4);
                    if ("http" != flag)
                        return value.substring(index + 1, value.length)
                    else
                        return "<a href='" + value + "'>"+ value.substring(index + 1, value.length) +"</a>";
                }
            }
        ],
        viewrecords: true,
        height: '100%',
        rowNum: 15,
        rowList : [15,30,50,100],
        rownumWidth: 25,
        autowidth:true,
        pager: "#jqGridPager",
        altRows: true,
        altclass: 'differ',
        //顯示水平捲軸
        shrinkToFit:false,
        autoScroll: true,
        jsonReader : {
            root: "data.list",
            page: "data.currPage",
            total: "data.totalPage",
            records: "data.totalCount"
        },
        postData:{
            'number': getString(vm.q.number),
            'release_cause': vm.q.status,
            'startTime':  $("#start_time").val(),
            'endTime': $("#end_time").val()
        },
        prmNames : {
            page:"page",
            rows:"limit",
            order: "order"
        },
        gridComplete:function(){
            //隱藏grid底部捲軸
            // $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
        },
        loadComplete: function(){
            var re_records = $("#jqGrid").getGridParam("records");
            if(isNull(re_records) || re_records<=0){
                vm.showjqGridPager=false;
            }else{
                vm.showjqGridPager=true;
            }
        }
    });
}


以上就是直播電商平臺開發,列太多,捲軸顯示, 更多內容歡迎關注之後的文章


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69978258/viewspace-2934983/,如需轉載,請註明出處,否則將追究法律責任。

相關文章