Skip to content

Commit

Permalink
fix: 修复批处理 checkbox 在浏览器后退时没有自动选中的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhwei committed Sep 14, 2020
1 parent bbf6c93 commit 4dc310b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"index.js": "/packages/wutongwan/lego/index-b9acc858805a130fee0f.js"
"index.js": "/packages/wutongwan/lego/index-9bf0f80de4563562fbe8.js"
}
2 changes: 1 addition & 1 deletion resources/assets/ui-bootstrap-jquery/grid-batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class GridBatch {
// 每行的 checkbox
for (const cb of this.element.getElementsByClassName('lego-batch-checkbox')) {
// 浏览器返回时 checkbox 状态不会丢失,所以在这里先刷一遍
cb.checked ? that.addInputId(cb.value) : that.delInputId(cb.value)
setTimeout(() => cb.checked ? that.addInputId(cb.value) : that.delInputId(cb.value))
cb.addEventListener('change', function () {
this.checked ? that.addInputId(this.value) : that.delInputId(this.value)
})
Expand Down
2 changes: 1 addition & 1 deletion resources/views/scripts.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
@if(config('lego.assets.global.bootstrap') || isset($legoInternalView))
<script src="/packages/wutongwan/lego/externals/bootstrap/js/bootstrap.min.js"></script>
@endif
<script src="/packages/wutongwan/lego/index-b9acc858805a130fee0f.js"></script>
<script src="/packages/wutongwan/lego/index-9bf0f80de4563562fbe8.js"></script>

@stack('lego-scripts')

0 comments on commit 4dc310b

Please sign in to comment.