浏览代码

Merge pull request #5674 from wenzhixin/fix/5663

Fixed bugs
Dustin Utecht 4 年之前
父节点
当前提交
fa9c87c2ce

+ 16 - 0
README.md

@@ -96,6 +96,22 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR
 
 Look at the [Change Log](https://github.com/wenzhixin/bootstrap-table/blob/master/CHANGELOG.md)
 
+## Local develop
+
+To develop bootstrap-table locally please run:
+
+```bash
+mkdir bootstrap-table-dev
+cd bootstrap-table-dev
+git clone https://github.com/wenzhixin/bootstrap-table
+git clone https://github.com/wenzhixin/bootstrap-table-examples
+
+yarn add http-server
+npx http-server
+```
+
+And then open: http://localhost:8081/bootstrap-table-examples
+
 ## Local build
 
 To build bootstrap-table locally please run:

+ 1 - 1
package.json

@@ -28,7 +28,7 @@
     "rollup-plugin-multi-entry": "^2.1.0",
     "rollup-plugin-node-resolve": "^5.0.4",
     "rollup-plugin-terser": "^7.0.0",
-    "rollup-plugin-vue": "6.0.0",
+    "rollup-plugin-vue": "5.1.9",
     "stylelint": "^13.3.3",
     "stylelint-config-standard": "^21.0.0",
     "vue-template-compiler": "^2.6.10"

+ 2 - 0
rollup.config.js

@@ -51,6 +51,7 @@ if (process.env.NODE_ENV === 'production') {
 
 for (const file of files) {
   let out = `dist/${file.replace('src/', '')}`
+
   if (process.env.NODE_ENV === 'production') {
     out = out.replace(/.js$/, '.min.js')
   }
@@ -68,6 +69,7 @@ for (const file of files) {
 }
 
 let out = 'dist/bootstrap-table-locale-all.js'
+
 if (process.env.NODE_ENV === 'production') {
   out = out.replace(/.js$/, '.min.js')
 }

+ 1 - 0
src/bootstrap-table.js

@@ -1943,6 +1943,7 @@ class BootstrapTable {
 
         if (
           this.options.sidePagination === 'server' &&
+          this.options.pageNumber > 1 &&
           res[this.options.totalField] > 0 &&
           !res[this.options.dataField].length
         ) {

+ 7 - 3
src/extensions/page-jump-to/bootstrap-table-page-jump-to.scss

@@ -1,6 +1,10 @@
-.bootstrap-table.bootstrap3 .fixed-table-pagination > .pagination ul.pagination,
-.bootstrap-table.bootstrap3 .fixed-table-pagination > .pagination .page-jump-to {
-  display: inline;
+.bootstrap-table.bootstrap3 .fixed-table-pagination > .pagination {
+  .page-jump-to {
+    display: inline-block;
+  }
+  .input-group-btn {
+    width: auto;
+  }
 }
 
 .bootstrap-table .fixed-table-pagination > .pagination .page-jump-to input {

+ 2 - 1
src/extensions/print/bootstrap-table-print.js

@@ -134,7 +134,8 @@ $.BootstrapTable = class extends $.BootstrapTable {
 
   doPrint (data) {
     const formatValue = (row, i, column) => {
-      const value = Utils.calculateObjectValue(column, column.printFormatter,
+      const value = Utils.calculateObjectValue(column,
+        column.printFormatter || column.formatter,
         [row[column.field], row, i], row[column.field])
 
       return typeof value === 'undefined' || value === null ?