ソースを参照

Table: add indeterminate state to multiple selection header checkbox (#9363)

* Table: Add indeterminate and disabled state to multiple selection header checkbox

* Remove disabled state handling of select-all checkbox
syn-zeta 7 年 前
コミット
ca02cb9cd3
1 ファイル変更2 行追加1 行削除
  1. 2 1
      packages/table/src/table-column.js

+ 2 - 1
packages/table/src/table-column.js

@@ -32,8 +32,9 @@ const defaults = {
 
 const forced = {
   selection: {
-    renderHeader: function(h) {
+    renderHeader: function(h, { store }) {
       return <el-checkbox
+        indeterminate={ store.states.selection.length > 0 && !this.isAllSelected }
         nativeOn-click={ this.toggleAllSelection }
         value={ this.isAllSelected } />;
     },