Browse Source

表格请求方式method支持自定义配置

RuoYi 4 năm trước cách đây
mục cha
commit
be3adb875f
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

+ 2 - 1
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@@ -38,6 +38,7 @@ var table = {
             	var defaults = {
             		id: "bootstrap-table",
             		type: 0, // 0 代表bootstrapTable 1代表bootstrapTreeTable
+            		method: 'post',
         		    height: undefined,
         		    sidePagination: "server",
         		    sortName: "",
@@ -78,7 +79,7 @@ var table = {
                 	id: options.id,
                     url: options.url,                                   // 请求后台的URL(*)
                     contentType: "application/x-www-form-urlencoded",   // 编码类型
-                    method: 'post',                                     // 请求方式(*)
+                    method: options.method,                             // 请求方式(*)
                     cache: false,                                       // 是否使用缓存
                     height: options.height,                             // 表格的高度
                     striped: options.striped,                           // 是否显示行间隔色