//左侧组件配置数据 z.autodeploy.addSideComp({ id:"sidecompgrid", sidecomp:{ img:"https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2867068672,3134492367&fm=26&gp=0.jpg", text:"grid列表" }, temp:function(compconfig){ return '
'; }, render:function(el,compconfig){ var options=compconfig.options, datasource=compconfig.datasource; z.ui.jqgrid(el).init({ striped:options.striped&&options.striped.value, pagination:options.pagination&&options.pagination.value, height:options.height&&options.height.value, width:options.width&&options.width.value, rowNum :options.rowNum&&options.rowNum.value, rowList :options.rowList&&options.rowList.value, sortname :options.sortname&&options.sortname.value, sortorder :options.sortorder&&options.sortorder.value, viewrecords :options.viewrecords&&options.viewrecords.value, reloadfirstpage :options.reloadfirstpage&&options.reloadfirstpage.value, multiboxonly:options.multiboxonly&&options.multiboxonly.value, selectwidthcheck:options.selectwidthcheck&&options.selectwidthcheck.value, shrinkToFit :options.shrinkToFit&&options.shrinkToFit.value, multiselect :options.multiselect&&options.multiselect.value, headercount:options.heade&&options.headercount, mtype:'get',//向后台请求数据的ajax的类型,可选post,get,默认post url : datasource.url.value,//组件创建完成之后请求数据的url colModel : [ {name: 'id',label:'id',width : 30,fixed:true}, {name: 'invdate',label:'表头1',width : 50,fixed:true}, {name: 'name',label:'表头2',width : 150,fixed:true}, {name: 'amount',label:'表头3',width : 300,align : "right",minwidth:50}, {name: 'tax',label:'表头4',width : 200,align : "right",minwidth:50}, {name: 'total',label:'表头5',width : 300,align : "right",minwidth:50} ] }); }, options:{ "multiselect":{ type:'select', text:"有复选框", items:[ { value:false, text:"否" }, { value:true, text:"是" } ], value:false }, "multiboxonly":{ type:'select', text:"点击行单选", items:[ { value:false, text:"否" }, { value:true, text:"是" } ], value:true }, "selectwidthcheck":{ type:'select', text:"select关联checkbox", items:[ { value:false, text:"否" }, { value:true, text:"是" } ], value:true }, "striped":{ type:'select', text:"隔行变色", items:[ { value:false, text:"否" }, { value:true, text:"是" } ], value:true }, "pagination":{ type:'select', text:"是否分页", items:[ { value:false, text:"否" }, { value:true, text:"是" } ], value:true }, "viewrecords":{ type:'select', text:"显示总条数", items:[ { value:false, text:"否" }, { value:true, text:"是" } ], value:true }, "reloadfirstpage":{ type:'select', text:"刷新回到第一页", items:[ { value:false, text:"否" }, { value:true, text:"是" } ], value:true }, "rowNum":{ type:'select', text:"一页显示条数", items:[ { value:"10", text:"10" }, { value:"20", text:"20" }, { value:"50", text:"50" }, { value:"100", text:"100" } ], value:"10" }, "width":{ type:'input', text:"宽度", value:"", placeholder:"请输入" }, "height":{ type:'input', text:"高度", value:"", placeholder:"请输入" }, }, methods:{}, datasource:{ url:{ type:'input', text:"地址", value:"compdata/griddata.json" } } })