mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-07 09:18:49 +01:00
This commit is contained in:
parent
4047f95016
commit
33dfa0de4e
3 changed files with 37 additions and 5 deletions
|
|
@ -20,7 +20,7 @@ export class EventBus<DetailType = any> {
|
|||
}
|
||||
|
||||
emit(type: TEventBus, detail?: DetailType) {
|
||||
return this.eventTarget.dispatchEvent(new CustomEvent(type, {detail}));
|
||||
return this.eventTarget.dispatchEvent(new CustomEvent(type, {detail, cancelable: true}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue