// 以angular写法为例
public unfold = true;
public unfoldClickNum = 0;
setSwitch() {
if (this.unfoldClickNum % 2 !== 0) { // 折叠逻辑
this.unfoldClickNum = 0;
this.unfold = true;
} else { // 展开逻辑
this.unfoldClickNum = 1;
this.unfold = false;
}
}
03-18
789
07-18
198
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交