소스 검색

Table: init filters.

Liril 8 년 전
부모
커밋
d652e73f74
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      packages/table/src/table.vue

+ 10 - 0
packages/table/src/table.vue

@@ -369,6 +369,16 @@
       this.bindEvents();
       this.doLayout();
 
+      // init filters
+      this.store.states.columns.forEach(column => {
+        if (column.filteredValue && column.filteredValue.length) {
+          this.store.commit('filterChange', {
+            column,
+            values: column.filteredValue
+          });
+        }
+      });
+
       this.$ready = true;
     },