typescript for exception
Posted Cluster Note
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了typescript for exception相关的知识,希望对你有一定的参考价值。
...
for 循环之前需要初始化被赋值的对象,否则每次被赋值的是同一个对象,而且是这个对象最后一次被赋值的情况
参考 https://blog.csdn.net/qq_38758765/article/details/115749097
HuDerr(): void{ this.data3.data.sections.forEach( (value, index, array) =>{ console.log(\'L1\', value); let va = array[index]; this.IIdd.title = va.name; this.IIdd.id = va.sectionId; va.items.forEach( (value2, index1, array1) => { console.log(\'L2 for ====>\', value2, \'index1==>\' ,index1, \'arr1==>\', array1); let vaa = array1[index1]; this.Idd.title = vaa.name; this.Idd.id = vaa.id; } ); this.IIdd.children.push(this.Idd); console.log(\'L1===>\', this.IIdd); console.log(\'l1 sep===>\'); this.data1.push(this.IIdd); // console.log(\'in for data1===>\', this.data1); return; } ); } HuD(): void { for (const item of this.data3.data.sections) { this.IIdd = { id: \'\', title: \'\', children: [] }; this.IIdd.title = item.name; this.IIdd.id = item.sectionId; console.log(this.IIdd); const va = item; for (let emm of va.items){ this.Idd = {id: \'\', title: \'\' }; const mm =emm; console.log(\'emm===>\', mm); this.Idd.id=mm.id; this.Idd.title=mm.name; this.IIdd.children.push(this.Idd); console.log(this.IIdd); continue; } this.data1.push(this.IIdd); console.log(this.data1); console.log(\'L1 spw\'); } }
以上是关于typescript for exception的主要内容,如果未能解决你的问题,请参考以下文章
selenium.common.exceptions.InvalidSessionIdException通过Python在无头模式下使用GeckoDriver Selenium Firefox(示例代
Symfony Component HttpKernel Exception AccessDeniedHttpException This action is unauthorized(示例代
selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary(示例代
BUG03- MP的批量操作不能插入空集合com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: error: entityL(代
bugRecord2selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable(代
PySpark local模式执行读取mongodb报错 Exception: Java gateway process exited before sending its port number(代