在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ react if判斷結(jié)果為false時保持不變,如何書寫?

react if判斷結(jié)果為false時保持不變,如何書寫?

{this.state.deviceId == this.state.mqttDeviceId ? this.state.BData : false }
判斷,兩個state相等時,該標簽顯示Bdata的值,如果不相等想讓他保持不變,:后邊該如何編碼?

回答
編輯回答
尛曖昧
{this.state.deviceId == this.state.mqttDeviceId && this.state.BData}
2018年4月27日 04:09
編輯回答
做不到
{this.state.deviceId === this.state.mqttDeviceId && this.state.BData}
2018年7月15日 02:18