浏览代码

Added bootstrap v4 icon support.

zhixin 7 年之前
父节点
当前提交
03b2d317ee
共有 1 个文件被更改,包括 14 次插入1 次删除
  1. 14 1
      src/extensions/filter-control/bootstrap-table-filter-control.js

+ 14 - 1
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -507,6 +507,19 @@
     }
   }
 
+  const bootstrap = {
+    3: {
+      icons: {
+        clear: 'glyphicon-trash icon-clear'
+      }
+    },
+    4: {
+      icons: {
+        clear: 'fa-trash icon-clear'
+      }
+    }
+  }[Utils.bootstrapVersion]
+
   $.extend($.fn.bootstrapTable.defaults, {
     filterControl: false,
     onColumnSearch (field, text) {
@@ -565,7 +578,7 @@
   })
 
   $.extend($.fn.bootstrapTable.defaults.icons, {
-    clear: 'glyphicon-trash icon-clear'
+    clear: bootstrap.icons.clear
   })
 
   $.extend($.fn.bootstrapTable.locales, {