浏览代码

use the bootstrap icons

Dustin Utecht 4 年之前
父节点
当前提交
e8c489e370

+ 1 - 1
dist/bootstrap-table.js

@@ -2813,7 +2813,7 @@
       }
     },
     5: {
-      iconsPrefix: 'fa',
+      iconsPrefix: 'bi',
       icons: {
         paginationSwitchDown: 'fa-caret-square-down',
         paginationSwitchUp: 'fa-caret-square-up',

+ 12 - 12
src/constants/index.js

@@ -120,19 +120,19 @@ const CONSTANTS = {
     }
   },
   5: {
-    iconsPrefix: 'fa',
+    iconsPrefix: 'bi',
     icons: {
-      paginationSwitchDown: 'fa-caret-square-down',
-      paginationSwitchUp: 'fa-caret-square-up',
-      refresh: 'fa-sync',
-      toggleOff: 'fa-toggle-off',
-      toggleOn: 'fa-toggle-on',
-      columns: 'fa-th-list',
-      detailOpen: 'fa-plus',
-      detailClose: 'fa-minus',
-      fullscreen: 'fa-arrows-alt',
-      search: 'fa-search',
-      clearSearch: 'fa-trash'
+      paginationSwitchDown: 'bi-caret-down-square',
+      paginationSwitchUp: 'bi-caret-up-square',
+      refresh: 'bi-arrow-clockwise',
+      toggleOff: 'bi-toggle-off',
+      toggleOn: 'bi-toggle-on',
+      columns: 'bi-list-ul',
+      detailOpen: 'bi-plus',
+      detailClose: 'bi-dash',
+      fullscreen: 'bi-arrows-move',
+      search: 'bi-search',
+      clearSearch: 'bi-trash'
     },
     classes: {
       buttonsPrefix: 'btn',

+ 1 - 0
src/extensions/auto-refresh/bootstrap-table-auto-refresh.js

@@ -17,6 +17,7 @@ $.extend($.fn.bootstrapTable.defaults, {
 $.extend($.fn.bootstrapTable.defaults.icons, {
   autoRefresh: {
     bootstrap3: 'glyphicon-time icon-time',
+    bootstrap5: 'bi-clock',
     materialize: 'access_time',
     'bootstrap-table': 'icon-clock'
   }[$.fn.bootstrapTable.theme] || 'fa-clock'

+ 1 - 0
src/extensions/copy-rows/bootstrap-table-copy-rows.js

@@ -15,6 +15,7 @@ $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales)
 $.extend($.fn.bootstrapTable.defaults.icons, {
   copy: {
     bootstrap3: 'glyphicon-copy icon-pencil',
+    bootstrap5: 'bi-clipboard',
     materialize: 'content_copy',
     'bootstrap-table': 'icon-copy'
   }[$.fn.bootstrapTable.theme] || 'fa-copy'

+ 1 - 0
src/extensions/custom-view/bootstrap-table-custom-view.js

@@ -14,6 +14,7 @@ $.extend($.fn.bootstrapTable.defaults, {
 $.extend($.fn.bootstrapTable.defaults.icons, {
   customView: {
     bootstrap3: 'glyphicon glyphicon-eye-open',
+    bootstrap5: 'bi-eye',
     bootstrap4: 'fa fa-eye',
     semantic: 'fa fa-eye',
     foundation: 'fa fa-eye',

+ 1 - 0
src/extensions/export/bootstrap-table-export.js

@@ -43,6 +43,7 @@ $.extend($.fn.bootstrapTable.columnDefaults, {
 $.extend($.fn.bootstrapTable.defaults.icons, {
   export: {
     bootstrap3: 'glyphicon-export icon-share',
+    bootstrap5: 'bi-download',
     materialize: 'file_download',
     'bootstrap-table': 'icon-download'
   }[$.fn.bootstrapTable.theme] || 'fa-download'

+ 2 - 3
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -70,15 +70,14 @@ $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
 })
 
 $.extend($.fn.bootstrapTable.defaults.icons, {
-  clear: {
-    bootstrap3: 'glyphicon-trash icon-clear'
-  }[$.fn.bootstrapTable.theme] || 'fa-trash',
   filterControlSwitchHide: {
     bootstrap3: 'glyphicon-zoom-out icon-zoom-out',
+    bootstrap5: 'bi-zoom-out',
     materialize: 'zoom_out'
   }[$.fn.bootstrapTable.theme] || 'fa-search-minus',
   filterControlSwitchShow: {
     bootstrap3: 'glyphicon-zoom-in icon-zoom-in',
+    bootstrap5: 'bi-zoom-in',
     materialize: 'zoom_in'
   }[$.fn.bootstrapTable.theme] || 'fa-search-plus'
 })

+ 2 - 0
src/extensions/group-by-v2/bootstrap-table-group-by.js

@@ -21,10 +21,12 @@ const groupBy = (array, f) => {
 $.extend($.fn.bootstrapTable.defaults.icons, {
   collapseGroup: {
     bootstrap3: 'glyphicon-chevron-up',
+    bootstrap5: 'bi-chevron-up',
     materialize: 'arrow_drop_down'
   }[$.fn.bootstrapTable.theme] || 'fa-angle-up',
   expandGroup: {
     bootstrap3: 'glyphicon-chevron-down',
+    bootstrap5: 'bi-chevron-down',
     materialize: 'arrow_drop_up'
   }[$.fn.bootstrapTable.theme] || 'fa-angle-down'
 })

+ 3 - 3
src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

@@ -12,7 +12,7 @@ $.extend($.fn.bootstrapTable.defaults.icons, {
   plus: {
     bootstrap3: 'glyphicon-plus',
     bootstrap4: 'fa-plus',
-    bootstrap5: 'fa-plus',
+    bootstrap5: 'bi-plus',
     semantic: 'fa-plus',
     materialize: 'plus',
     foundation: 'fa-plus',
@@ -22,7 +22,7 @@ $.extend($.fn.bootstrapTable.defaults.icons, {
   minus: {
     bootstrap3: 'glyphicon-minus',
     bootstrap4: 'fa-minus',
-    bootstrap5: 'fa-minus',
+    bootstrap5: 'bi-dash',
     semantic: 'fa-minus',
     materialize: 'minus',
     foundation: 'fa-minus',
@@ -32,7 +32,7 @@ $.extend($.fn.bootstrapTable.defaults.icons, {
   sort: {
     bootstrap3: 'glyphicon-sort',
     bootstrap4: 'fa-sort',
-    bootstrap5: 'fa-sort',
+    bootstrap5: 'bi-arrow-down-up',
     semantic: 'fa-sort',
     materialize: 'sort',
     foundation: 'fa-sort',

+ 1 - 1
src/extensions/toolbar/bootstrap-table-toolbar.js

@@ -69,7 +69,7 @@ const theme = {
   },
   bootstrap5: {
     icons: {
-      advancedSearchIcon: 'fa-chevron-down'
+      advancedSearchIcon: 'bi-chevron-down'
     },
     html: {
       modal: `