瀏覽代碼

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;
     },