Browse Source

Merge pull request #4336 from tangram67/develop

Implement a version number
文翼 6 years ago
parent
commit
1bcf73d1f7
2 changed files with 6 additions and 0 deletions
  1. 2 0
      src/bootstrap-table.js
  2. 4 0
      src/constants/index.js

+ 2 - 0
src/bootstrap-table.js

@@ -2676,6 +2676,7 @@ class BootstrapTable {
   }
 }
 
+BootstrapTable.VERSION = Constants.VERSION
 BootstrapTable.DEFAULTS = Constants.DEFAULTS
 BootstrapTable.LOCALES = Constants.LOCALES
 BootstrapTable.COLUMN_DEFAULTS = Constants.COLUMN_DEFAULTS
@@ -2751,6 +2752,7 @@ $.fn.bootstrapTable = function (option, ...args) {
 
 $.fn.bootstrapTable.Constructor = BootstrapTable
 $.fn.bootstrapTable.theme = Constants.THEME
+$.fn.bootstrapTable.VERSION = Constants.VERSION
 $.fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS
 $.fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS
 $.fn.bootstrapTable.events = BootstrapTable.EVENTS

+ 4 - 0
src/constants/index.js

@@ -1,3 +1,5 @@
+const VERSION = '1.14.2'
+
 let bootstrapVersion = 4
 try {
   const rawVersion = $.fn.dropdown.Constructor.VERSION
@@ -401,6 +403,8 @@ const EVENTS = {
 Object.assign(DEFAULTS, EN)
 
 export default {
+  VERSION, 
+  
   THEME: `bootstrap${bootstrapVersion}`,
 
   CONSTANTS,