清除筛选调整完成

This commit is contained in:
lmj
2022-12-06 17:09:12 +08:00
parent 161d1d1d03
commit 258cb6d4bf

View File

@@ -3,7 +3,7 @@
<view style="line-height: 34upx;height: 35upx;padding-right: 40upx;font-size: 32upx;">
<!-- <text style="color: #666;font-size: 30rpx;">筛选</text> -->
<image @click="showFilter()" src="../../static/images/filter.png" style="width: 36upx;height: 36upx;vertical-align: middle;"></image>
<text class="clearsift" @click="clearsf()">清除筛选</text>
<text v-if="clearswitch" class="clearsift" @click="clearsf()">清除筛选</text>
</view>
<!-- ${filterWidth} -->
<u-popup :show="filterShow" mode="center" @close="closeFilter" :safeAreaInsetTop="true" :closeable="false">
@@ -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();
}
}
}