storeValue (restitle) {
document.title = restitle?.deptName
this.title = restitle?.deptName
this.tenantId = restitle?.tenantId
}
//this.title = restitle?.deptName 等价于
//this.title = restitle && restitle.deptName
作用就是获取restitle的值,或者是restitle.depname的值
var obj ={}
console.log(obj?.a?.b ?? 233 ) //233
var obj={a:{b:1}}
console.log(obj?.a?.b??233) //1
双问号后面接的是默认值