<el-button :icon="!moreshow?'el-icon-arrow-down':'el-icon-arrow-up'" @click="getmoreshow">{{!moreshow?更多:隐藏}}</el-button>
data() {
return {
moreshow:false,
count:1,
}
}
mounted() {
this.getmoreshow()//避免点击两次才生效
},
methods: {
getmoreshow(){
if(this.count%2==0){
this.moreshow=true
}else{
this.moreshow=false
}
this.count++
},
}