diff --git a/components/data-filter/data-filter.vue b/components/data-filter/data-filter.vue index 605e724..6855fd1 100644 --- a/components/data-filter/data-filter.vue +++ b/components/data-filter/data-filter.vue @@ -3,7 +3,7 @@ - 清除筛选 + 清除筛选 @@ -105,6 +105,7 @@ }, data(){ return{ + clearswitch:false, courseSysTypeTree:[], courseScenceList:[], filterShow:false,//是否显示过虑器 @@ -132,6 +133,8 @@ mounted() { // this.filterWidth=(this.$width-100)+'px'; //右边出来的抽屉宽度控制 this.loadData(); + this.clswitch(); + }, computed:{ filterTags(){ //过滤标签 @@ -194,7 +197,17 @@ } }, methods:{ + clswitch(){ + if(this.filterTags.length == 3 || this.filterTags.length == 0){ + console.log(this.filterTags.length) + this.clearswitch = false; + }else{ + this.clearswitch = true; + } + }, + // 清除筛选 clearsf(){ + console.log(this.filterTags); if(this.type==1){//生成课程查询条件 let params={ pageIndex:1, @@ -213,6 +226,7 @@ cateName:'' } this.$emit('submit',this.filterTags,params); + this.clearswitch = false; } this.course.sysType1 = ''; this.course.sysType2 = ''; @@ -414,7 +428,8 @@ this.$emit('submit',this.filterTags,params); } - + console.log(this.filterTags.length,'llll') + this.clswitch(); } } }