提交 cfa081e7 编写于 作者: C cy7717

mod

Signed-off-by: Ncy7717 <chenyu301@huawei.com>
上级 59bce179
......@@ -906,6 +906,16 @@ on(type: 'complete'|'pause'|'remove', callback:() =&gt; void): void
console.info('Download task completed.');
};
downloadTask.on('complete', completeCallback);
let pauseCallback = () => {
console.info('Download task pause.');
};
downloadTask.on('pause', pauseCallback);
let removeCallback = () => {
console.info('Download task remove.');
};
downloadTask.on('remove', removeCallback);
```
......@@ -933,6 +943,16 @@ off(type: 'complete'|'pause'|'remove', callback?:() =&gt; void): void
console.info('Download delete complete notification.');
};
downloadTask.off('complete', completeCallback);
let pauseCallback = () => {
console.info('Download delete pause notification.');
};
downloadTask.off('pause', pauseCallback);
let removeCallback = () => {
console.info('Download delete remove notification.');
};
downloadTask.off('remove', removeCallback);
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册