Skip to content

Commit

Permalink
chore(player): 替换废弃写法
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9804 committed Oct 18, 2024
1 parent 5e393a0 commit 9df806c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/ba-story-player/lib/layers/effectLayer/resourcesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ function download(b64: string) {
const a = document.createElement("a");
a.href = b64;
a.download = "result.png"; //设定下载名称
const evt = document.createEvent("MouseEvents");
evt.initEvent("click", true, true);
const evt = new MouseEvent("click", {
bubbles: true,
cancelable: true,
view: window
});
a.dispatchEvent(evt);
}

Expand Down

0 comments on commit 9df806c

Please sign in to comment.