From 1086f1ecc35e17f6020eff461d6989e11a2d5166 Mon Sep 17 00:00:00 2001 From: zhixin Date: Sat, 6 Apr 2024 23:21:55 +0800 Subject: [PATCH 1/3] Updated packages to latest version --- assets/js/template.js | 2 +- crud/index.html | 8 ++++---- extensions/editable.html | 4 ++-- extensions/export.html | 4 ++-- extensions/print.html | 2 +- for-test-bootstrap3.html | 2 +- for-test-bootstrap4.html | 2 +- for-test-bulma.html | 4 ++-- for-test-foundation.html | 6 +++--- for-test-semantic.html | 6 +++--- for-test.html | 6 +++--- index.html | 8 ++++---- issues/188.html | 2 +- issues/3830.html | 2 +- issues/4214.html | 2 +- issues/4586.html | 2 +- issues/986.html | 4 ++-- options/icons-prefix.html | 2 +- template-bootstrap-table.html | 4 ++-- template-bootstrap3.html | 4 ++-- template-bootstrap4.html | 6 +++--- template-bulma.html | 6 +++--- template-foundation.html | 8 ++++---- template-materialize.html | 2 +- template-semantic.html | 8 ++++---- template.html | 10 +++++----- vue-starter/public/index.html | 2 +- welcome.html | 2 +- welcomes/vue-component.html | 2 +- 29 files changed, 61 insertions(+), 61 deletions(-) diff --git a/assets/js/template.js b/assets/js/template.js index fa6836b1..cada08e4 100644 --- a/assets/js/template.js +++ b/assets/js/template.js @@ -16,7 +16,7 @@ function _getLink(file) { file.replace(/\.min/, '') + '?t=' + (+new Date()) } } - return '' + return '' } function _getScript(file, isScriptTag) { diff --git a/crud/index.html b/crud/index.html index 11f4b4e3..ef07f385 100644 --- a/crud/index.html +++ b/crud/index.html @@ -3,8 +3,8 @@ CRUD Table - - + + - - + + diff --git a/extensions/editable.html b/extensions/editable.html index f19d94e7..1cfb897d 100644 --- a/extensions/editable.html +++ b/extensions/editable.html @@ -3,11 +3,11 @@ title: 'Editable', desc: 'Use Plugin: x-editable and bootstrap-table-editable.', links: [ - 'https://cdn.jsdelivr.net/npm/x-editable@1.5.1/dist/bootstrap3-editable/css/bootstrap-editable.css', + 'https://cdn.jsdelivr.net/npm/x-editable@1.5.11/dist/bootstrap3-editable/css/bootstrap-editable.css', 'bootstrap-table.min.css' ], scripts: [ - 'https://cdn.jsdelivr.net/npm/x-editable@1.5.1/dist/bootstrap3-editable/js/bootstrap-editable.min.js', + 'https://cdn.jsdelivr.net/npm/x-editable@1.5.11/dist/bootstrap3-editable/js/bootstrap-editable.min.js', 'bootstrap-table.min.js', 'extensions/editable/bootstrap-table-editable.min.js' ] diff --git a/extensions/export.html b/extensions/export.html index 31b07569..ab06b111 100644 --- a/extensions/export.html +++ b/extensions/export.html @@ -6,8 +6,8 @@ 'bootstrap-table.min.css' ], scripts: [ - 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.28.0/tableExport.min.js', - 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.28.0/libs/jsPDF/jspdf.umd.min.js', + 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.29.0/tableExport.min.js', + 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.29.0/libs/jsPDF/jspdf.umd.min.js', 'bootstrap-table.min.js', 'extensions/export/bootstrap-table-export.min.js' ] diff --git a/extensions/print.html b/extensions/print.html index 30af812d..a5d8c7d7 100644 --- a/extensions/print.html +++ b/extensions/print.html @@ -29,7 +29,7 @@ function mounted() { $table.bootstrapTable({ - printStyles: ['https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css'] + printStyles: ['https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css'] }) } diff --git a/for-test-bootstrap3.html b/for-test-bootstrap3.html index 9ea27523..41f98d62 100644 --- a/for-test-bootstrap3.html +++ b/for-test-bootstrap3.html @@ -9,7 +9,7 @@ - + diff --git a/for-test-bootstrap4.html b/for-test-bootstrap4.html index 6fd87478..17c7f241 100644 --- a/for-test-bootstrap4.html +++ b/for-test-bootstrap4.html @@ -9,7 +9,7 @@ - + diff --git a/for-test-bulma.html b/for-test-bulma.html index 2965d969..3a68e3f2 100644 --- a/for-test-bulma.html +++ b/for-test-bulma.html @@ -8,8 +8,8 @@ - - + + diff --git a/for-test-foundation.html b/for-test-foundation.html index 1011c999..150016bb 100644 --- a/for-test-foundation.html +++ b/for-test-foundation.html @@ -9,11 +9,11 @@ - - + + - + diff --git a/for-test-semantic.html b/for-test-semantic.html index 027855ee..a0dbcc4b 100644 --- a/for-test-semantic.html +++ b/for-test-semantic.html @@ -8,11 +8,11 @@ - - + + - + diff --git a/for-test.html b/for-test.html index 62343163..0f408c78 100644 --- a/for-test.html +++ b/for-test.html @@ -8,11 +8,11 @@ - - + + - + diff --git a/index.html b/index.html index 69f7ed92..e08a3691 100644 --- a/index.html +++ b/index.html @@ -7,12 +7,12 @@ - + - - + + @@ -589,7 +589,7 @@ - + diff --git a/issues/188.html b/issues/188.html index f19efa1d..701cd012 100644 --- a/issues/188.html +++ b/issues/188.html @@ -6,7 +6,7 @@ 'bootstrap-table.min.css' ], scripts: [ - 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.28.0/tableExport.min.js', + 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.29.0/tableExport.min.js', 'bootstrap-table.min.js', 'extensions/export/bootstrap-table-export.min.js' ] diff --git a/issues/3830.html b/issues/3830.html index 083ea7a2..ac834bc9 100644 --- a/issues/3830.html +++ b/issues/3830.html @@ -4,7 +4,7 @@ desc: 'Export all records with server side pagination(#3830).', links: ['bootstrap-table.min.css'], scripts: [ - 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.28.0/tableExport.min.js', + 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.29.0/tableExport.min.js', 'bootstrap-table.min.js', 'extensions/export/bootstrap-table-export.min.js' ] diff --git a/issues/4214.html b/issues/4214.html index 96e3cfed..fde46a47 100644 --- a/issues/4214.html +++ b/issues/4214.html @@ -4,7 +4,7 @@ desc: 'Added index field.(#4214).', links: ['bootstrap-table.min.css'], scripts: [ - 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.28.0/tableExport.min.js', + 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.29.0/tableExport.min.js', 'bootstrap-table.min.js', 'extensions/export/bootstrap-table-export.min.js' ] diff --git a/issues/4586.html b/issues/4586.html index 07a5d929..1640e630 100644 --- a/issues/4586.html +++ b/issues/4586.html @@ -4,7 +4,7 @@ desc: 'Customize data attribute of td.(#4586).', links: ['bootstrap-table.min.css'], scripts: [ - 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.28.0/tableExport.min.js', + 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.29.0/tableExport.min.js', 'bootstrap-table.min.js', 'extensions/export/bootstrap-table-export.min.js' ] diff --git a/issues/986.html b/issues/986.html index 005c3dd2..5fb318f3 100644 --- a/issues/986.html +++ b/issues/986.html @@ -3,11 +3,11 @@ title: 'Issue #986', desc: 'Editable select box(#986).', links: [ - 'https://cdn.jsdelivr.net/npm/x-editable@1.5.1/dist/bootstrap3-editable/css/bootstrap-editable.css', + 'https://cdn.jsdelivr.net/npm/x-editable@1.5.11/dist/bootstrap3-editable/css/bootstrap-editable.css', 'bootstrap-table.min.css' ], scripts: [ - 'https://cdn.jsdelivr.net/npm/x-editable@1.5.1/dist/bootstrap3-editable/js/bootstrap-editable.min.js', + 'https://cdn.jsdelivr.net/npm/x-editable@1.5.11/dist/bootstrap3-editable/js/bootstrap-editable.min.js', 'bootstrap-table.min.js', 'extensions/editable/bootstrap-table-editable.min.js' ] diff --git a/options/icons-prefix.html b/options/icons-prefix.html index 113ee4b8..e65496c9 100644 --- a/options/icons-prefix.html +++ b/options/icons-prefix.html @@ -3,7 +3,7 @@ title: 'Icons Prefix', desc: 'Use `iconsPrefix` option to defines icon set name. In the case we use font-awesome instead of bootstrap-icons by default.', links: [ - 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css', + 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css', 'bootstrap-table.min.css' ], scripts: ['bootstrap-table.min.js'] diff --git a/template-bootstrap-table.html b/template-bootstrap-table.html index 0a392d2c..5dd774e0 100644 --- a/template-bootstrap-table.html +++ b/template-bootstrap-table.html @@ -10,7 +10,7 @@ - + @@ -27,7 +27,7 @@ - + diff --git a/template-bootstrap3.html b/template-bootstrap3.html index 6ce29cca..b8f03f8a 100644 --- a/template-bootstrap3.html +++ b/template-bootstrap3.html @@ -11,7 +11,7 @@ - + @@ -19,7 +19,7 @@ - + diff --git a/template-bootstrap4.html b/template-bootstrap4.html index 0108e1de..782dc08a 100644 --- a/template-bootstrap4.html +++ b/template-bootstrap4.html @@ -9,16 +9,16 @@ - + - + - + diff --git a/template-bulma.html b/template-bulma.html index 7d95d9f9..8547b8fc 100644 --- a/template-bulma.html +++ b/template-bulma.html @@ -9,15 +9,15 @@ - - + + - + diff --git a/template-foundation.html b/template-foundation.html index cb8c5903..d2b85cff 100644 --- a/template-foundation.html +++ b/template-foundation.html @@ -9,16 +9,16 @@ - - + + - - + + diff --git a/template-materialize.html b/template-materialize.html index 1cfc744f..cfd5c83d 100644 --- a/template-materialize.html +++ b/template-materialize.html @@ -25,7 +25,7 @@ - + diff --git a/template-semantic.html b/template-semantic.html index 5acdbf15..dc90cd42 100644 --- a/template-semantic.html +++ b/template-semantic.html @@ -9,16 +9,16 @@ - - + + - - + + diff --git a/template.html b/template.html index a208dce3..3cb22763 100644 --- a/template.html +++ b/template.html @@ -8,9 +8,9 @@ - - - + + + @@ -36,8 +36,8 @@

- - + + diff --git a/vue-starter/public/index.html b/vue-starter/public/index.html index 84899b4f..48bd56b2 100644 --- a/vue-starter/public/index.html +++ b/vue-starter/public/index.html @@ -5,7 +5,7 @@ - + vue-starter diff --git a/welcome.html b/welcome.html index a3d452b1..bd416cd0 100644 --- a/welcome.html +++ b/welcome.html @@ -6,7 +6,7 @@ 'bootstrap-table.min.css' ], scripts: [ - 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.28.0/tableExport.min.js', + 'https://cdn.jsdelivr.net/npm/tableexport.jquery.plugin@1.29.0/tableExport.min.js', 'bootstrap-table.min.js', 'https://cdn.jsdelivr.net/npm/bootstrap-table@1.22.4/dist/bootstrap-table-locale-all.min.js', 'extensions/export/bootstrap-table-export.min.js' diff --git a/welcomes/vue-component.html b/welcomes/vue-component.html index 4802bebb..c9d210be 100644 --- a/welcomes/vue-component.html +++ b/welcomes/vue-component.html @@ -6,7 +6,7 @@ 'bootstrap-table.min.css' ], scripts: [ - 'https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.min.js', + 'https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.min.js', 'bootstrap-table.min.js', 'https://cdn.jsdelivr.net/npm/bootstrap-table@1.22.4/dist/bootstrap-table-vue.min.js' ] From 51af3a8c05a21fb6e29461780e9c9183d6d4acb1 Mon Sep 17 00:00:00 2001 From: zhixin Date: Fri, 12 Apr 2024 09:13:20 +0800 Subject: [PATCH 2/3] Add editorconfig lint --- .editorconfig | 9 +++++++++ assets/css/template.css | 2 +- crud/db.json | 2 +- extensions/custom-view.html | 2 +- json/353.json | 2 +- json/409.json | 2 +- json/data2.json | 2 +- json/data3.json | 2 +- json/data4.json | 2 +- json/data5.json | 2 +- json/treegrid.json | 2 +- methods/sort-by.html | 12 ++++++------ options/sort-empty-last.html | 2 +- package.json | 8 ++++++-- utils/natural-sorting/dist/natural-sorting.js | 2 +- utils/natural-sorting/src/natural-sorting.js | 2 +- webpack-starter/src/index.js | 4 ++-- 17 files changed, 36 insertions(+), 23 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..0ed80365 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +end_of_line = lf +charset = utf-8 +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/assets/css/template.css b/assets/css/template.css index b4bd45d6..85861dc1 100644 --- a/assets/css/template.css +++ b/assets/css/template.css @@ -27,7 +27,7 @@ body { .header-wrapper { -js-display: flex; - display: flex; + display: flex; } .title-desc { diff --git a/crud/db.json b/crud/db.json index 5796c15e..890b68f7 100644 --- a/crud/db.json +++ b/crud/db.json @@ -36,4 +36,4 @@ "description": "my blog" } ] -} \ No newline at end of file +} diff --git a/extensions/custom-view.html b/extensions/custom-view.html index b00ea42b..74511982 100644 --- a/extensions/custom-view.html +++ b/extensions/custom-view.html @@ -212,7 +212,7 @@

%SNIPPETS%

.replace('%IMAGE%', row.image) .replace('%FOLLOWER%', row.follower) .replace('%FOLLOWING%', row.following) - .replace('%SNIPPETS%', row.snippets); + .replace('%SNIPPETS%', row.snippets) }) return `
${view}
` diff --git a/json/353.json b/json/353.json index 4bb35e52..d9a392f7 100644 --- a/json/353.json +++ b/json/353.json @@ -29,4 +29,4 @@ "account": 215, "computer": 289, "regcode": "1:2:215:289" -} \ No newline at end of file +} diff --git a/json/409.json b/json/409.json index d6af8e19..a59c24a3 100644 --- a/json/409.json +++ b/json/409.json @@ -14,4 +14,4 @@ "name": "New Item 2", "price": "$12" } -] \ No newline at end of file +] diff --git a/json/data2.json b/json/data2.json index 5696b3e7..c1184926 100644 --- a/json/data2.json +++ b/json/data2.json @@ -57,4 +57,4 @@ "price": "$10" } ] -} \ No newline at end of file +} diff --git a/json/data3.json b/json/data3.json index bfd247a3..b0c8e95a 100644 --- a/json/data3.json +++ b/json/data3.json @@ -29,4 +29,4 @@ "description": "Show/hide password plugin for twitter bootstrap." } } -] \ No newline at end of file +] diff --git a/json/data4.json b/json/data4.json index 846dc395..4c7fc8d5 100644 --- a/json/data4.json +++ b/json/data4.json @@ -32,4 +32,4 @@ } } ] -} \ No newline at end of file +} diff --git a/json/data5.json b/json/data5.json index d493637e..f0d1fbd7 100644 --- a/json/data5.json +++ b/json/data5.json @@ -188,4 +188,4 @@ "column3": "C 30", "column4": "C 40" } -] \ No newline at end of file +] diff --git a/json/treegrid.json b/json/treegrid.json index a12dd2d8..4e510a1c 100644 --- a/json/treegrid.json +++ b/json/treegrid.json @@ -62,4 +62,4 @@ "name": "删除环境", "permissionValue": "open:env:delete" } -] \ No newline at end of file +] diff --git a/methods/sort-by.html b/methods/sort-by.html index 2f223686..b583624b 100644 --- a/methods/sort-by.html +++ b/methods/sort-by.html @@ -51,22 +51,22 @@ var field = '' var sortOrder = '' - if (this.value == 'name_asc') { + if (this.value === 'name_asc') { field = 'github.name' sortOrder = 'asc' - } else if (this.value == 'name_desc') { + } else if (this.value === 'name_desc') { field = 'github.name' sortOrder = 'desc' - } else if (this.value == 'stargazers_asc') { + } else if (this.value === 'stargazers_asc') { field = 'github.count.stargazers' sortOrder = 'asc' - } else if (this.value == 'stargazers_desc') { + } else if (this.value === 'stargazers_desc') { field = 'github.count.stargazers' sortOrder = 'desc' - } else if (this.value == 'forks_asc') { + } else if (this.value === 'forks_asc') { field = 'github.count.forks' sortOrder = 'asc' - } else if (this.value == 'forks_desc') { + } else if (this.value === 'forks_desc') { field = 'github.count.forks' sortOrder = 'desc' } diff --git a/options/sort-empty-last.html b/options/sort-empty-last.html index 6972fa5d..09aac83a 100644 --- a/options/sort-empty-last.html +++ b/options/sort-empty-last.html @@ -55,4 +55,4 @@ ] $table.bootstrapTable({data: data}) } - \ No newline at end of file + diff --git a/package.json b/package.json index 1e8ecdc7..eca517e0 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ }, "homepage": "https://github.com/wenzhixin/bootstrap-table-examples", "scripts": { - "lint": "eslint --ext .html,.js .", + "lint:js": "eslint --ext .html,.js .", + "lint:editor": "editorconfig-checker", + "lint": "run-s lint:*", "build": "babel utils/natural-sorting/src -d utils/natural-sorting/dist" }, "devDependencies": { @@ -21,10 +23,12 @@ "@babel/core": "^7.7.2", "@babel/preset-env": "^7.7.1", "babel-eslint": "^10.0.3", + "editorconfig-checker": "^5.1.5", "eslint": "^5.10.0", "eslint-plugin-html": "^5.0.0", "eslint-plugin-vue": "^5.2.3", - "getopts": "^2.2.3" + "getopts": "^2.2.3", + "npm-run-all": "^4.1.5" }, "dependencies": { "express": "^4.17.1" diff --git a/utils/natural-sorting/dist/natural-sorting.js b/utils/natural-sorting/dist/natural-sorting.js index 38d94879..a48a6352 100644 --- a/utils/natural-sorting/dist/natural-sorting.js +++ b/utils/natural-sorting/dist/natural-sorting.js @@ -68,4 +68,4 @@ function numericOnly(a, b) { } return stripNonNumber(a) - stripNonNumber(b); -} \ No newline at end of file +} diff --git a/utils/natural-sorting/src/natural-sorting.js b/utils/natural-sorting/src/natural-sorting.js index 47c51eba..fb289ec9 100644 --- a/utils/natural-sorting/src/natural-sorting.js +++ b/utils/natural-sorting/src/natural-sorting.js @@ -55,7 +55,7 @@ function alphanum (a, b) { function numericOnly (a, b) { function stripNonNumber (s) { - s = s.replace(/^(-)|[.,](?=[^.,]*[.,](?!$))|[,.]+$|[^0-9.,]+/g, '$1'); + s = s.replace(/^(-)|[.,](?=[^.,]*[.,](?!$))|[,.]+$|[^0-9.,]+/g, '$1') return parseInt(s, 10) } diff --git a/webpack-starter/src/index.js b/webpack-starter/src/index.js index d284a3dc..3eb34a91 100644 --- a/webpack-starter/src/index.js +++ b/webpack-starter/src/index.js @@ -12,8 +12,8 @@ $('#table').bootstrapTable({ showColumns: true, columns: [ { - field: 'id', - title: 'Item ID' + field: 'id', + title: 'Item ID' }, { field: 'name', From c27ead6de516a56c90cc233415315dd3c3756278 Mon Sep 17 00:00:00 2001 From: zhixin Date: Mon, 29 Apr 2024 08:31:21 +0800 Subject: [PATCH 3/3] Build 1.22.5 --- assets/js/template.js | 2 +- crud/index.html | 4 ++-- options/table-locale.html | 2 +- package.json | 2 +- vue-starter/package.json | 2 +- webpack-starter/package.json | 2 +- welcome.html | 2 +- welcomes/vue-component.html | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/js/template.js b/assets/js/template.js index cada08e4..4f672fd9 100644 --- a/assets/js/template.js +++ b/assets/js/template.js @@ -1,7 +1,7 @@ window._config = { isDebug: location.hash.slice(1) === 'is-debug' || ['localhost', '127.0.0.1', 'dev.bootstrap-table.com'].indexOf(location.hostname) > -1, - cdnUrl: 'https://cdn.jsdelivr.net/npm/bootstrap-table@1.22.4/dist/', + cdnUrl: 'https://cdn.jsdelivr.net/npm/bootstrap-table@1.22.5/dist/', localUrl: '../bootstrap-table/src/', testUrl: '/src/' } diff --git a/crud/index.html b/crud/index.html index ef07f385..55b130a7 100644 --- a/crud/index.html +++ b/crud/index.html @@ -5,7 +5,7 @@ - +