写法优化 七千 2020-07-17 96 阅读1分钟 两个变量 一个显示另一个隐藏 type == 1 ? (this.alertShow = !(this.alertShow2 = true)) : (this.alertShow2 = !(this.alertShow = true)); // !(this.alertShow = true))括号里面的表达式依旧执行