瀏覽代碼

修复表格开启`responsive功能后点击全选checkbox无法取消单个checkbox问题

jqh 5 年之前
父節點
當前提交
39b0b47af7

+ 4 - 2
resources/assets/dcat/js/extensions/RowSelector.js

@@ -11,7 +11,9 @@ export default class RowSelector {
             // 选中效果颜色
             background: 'rgba(255, 255,213,0.4)',
             // 点击行事件
-            clickRow: false, 
+            clickRow: false,
+            // 表格选择器
+            container: 'table',
         }, options);
 
         _this._bind()
@@ -24,7 +26,7 @@ export default class RowSelector {
             $checkbox = $(checkboxSelector);
 
         $selectAllSelector.on('change', function() {
-            var cbx = $(checkboxSelector);
+            var cbx = $(this).parents(options.container).find(checkboxSelector);
 
             for (var i = 0; i < cbx.length; i++) {
                 if (this.checked && !cbx[i].checked) {

File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/js/dcat-app.js


File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/js/dcat-app.js.map


Some files were not shown because too many files changed in this diff