Closed b2nil closed 4 years ago
现象与 #13 一样。
原因是 H5 的点击事件为 MouseEvent, e.target.id 为 null, 导致 contentID 不是唯一。 可以将 e.timestamp 赋值给 contentID, 确保 contentID 是唯一的。
MouseEvent
e.target.id
null
contentID
e.timestamp
function handleClick(e: CommonEvent) { // contentID.value = 'content' + e.target.id contentID.value = 'content' + String(e.timeStamp).replace('.', '') ... }
现象与 #13 一样。
原因是 H5 的点击事件为
MouseEvent
,e.target.id
为null
, 导致contentID
不是唯一。 可以将e.timestamp
赋值给contentID
, 确保contentID
是唯一的。