Explorar el Código

适配bootstrap-tablev1.12.1不分页情况数据加载问题

zhouchenglin hace 7 años
padre
commit
9ff56fbdf3
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      src/main/resources/static/js/common.js

+ 5 - 0
src/main/resources/static/js/common.js

@@ -62,6 +62,11 @@ $.fn.bootstrapTableEx = function(opt){
 		columns: []
 	}
 	var option = $.extend({}, defaults, opt);
+    if(!option.pagination){
+        option.responseHandler = function(res) {
+            return res.rows;
+        }
+    }
 	$(this).bootstrapTable(option);
 }