浏览代码

revert 93c9c206e6121711798f1f3740ba45ed7a1a4793, and fix the bug by
typeof

吴亮 8 年之前
父节点
当前提交
e5fa4acfcc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packages/table/src/filter-panel.vue

+ 2 - 2
packages/table/src/filter-panel.vue

@@ -93,7 +93,7 @@
       handleSelect(filterValue) {
       handleSelect(filterValue) {
         this.filterValue = filterValue;
         this.filterValue = filterValue;
 
 
-        if (filterValue || filterValue === 0) {
+        if (typeof(filterValue) === "number" && filterValue >= 0) {
           this.confirmFilter(this.filteredValue);
           this.confirmFilter(this.filteredValue);
         } else {
         } else {
           this.confirmFilter([]);
           this.confirmFilter([]);
@@ -129,7 +129,7 @@
         },
         },
         set(value) {
         set(value) {
           if (this.filteredValue) {
           if (this.filteredValue) {
-            if (value || value === 0) {
+            if (typeof(value) === "number" && value >= 0) {
               this.filteredValue.splice(0, 1, value);
               this.filteredValue.splice(0, 1, value);
             } else {
             } else {
               this.filteredValue.splice(0, 1);
               this.filteredValue.splice(0, 1);