提交 ecb6bce4 编写于 作者: P pengyanggit

Signed-off-by:pengyanggit<yangpeng177@huawei.com>

Signed-off-by: Npengyanggit <yangpeng177@huawei.com>
Change-Id: I291df621ea33ed1ac8fd980e7667baa5a573f76c
上级 562258f2
...@@ -85,15 +85,23 @@ struct Index { ...@@ -85,15 +85,23 @@ struct Index {
@State abstractContent: string = "abstract"; @State abstractContent: string = "abstract";
@State textContent: string = ""; @State textContent: string = "";
getDataFromUdmfRetry(event: DragEvent, callback: (data: DragEvent)=>void) hasUdmfData(event: DragEvent, callback: (data: DragEvent)=>void)
{ {
let records: Array<udmf.UnifiedRecord> = event.getData().getRecords(); let records: Array<udmf.UnifiedRecord> = event.getData().getRecords();
if (records.length !== 0) { if (records.length !== 0) {
callback(event); callback(event);
return true;
}
return false;
}
getDataFromUdmfRetry(event: DragEvent, callback: (data: DragEvent)=>void)
{
if(hasUdmfData(event, callback)) {
return; return;
} }
setTimeout(()=>{ setTimeout(()=>{
this.getDataFromUdmfRetry(event, callback); this.hasUdmfData(event, callback);
}, 1500); }, 1500);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册