list length:{list.length}
{
- list.map(item =>
{item.state}
)
+ // 5. item中state的参数类型
+ // 6. 通过map循环需要给标签加唯一的key
+ list.map((item: ItemProps) =>
{item.state}
)
}
)
diff --git a/src/utils/EventEmitter.ts b/src/utils/EventEmitter.ts
index f48c4ed..7115609 100644
--- a/src/utils/EventEmitter.ts
+++ b/src/utils/EventEmitter.ts
@@ -7,7 +7,7 @@ class EventEmitter