Skip to content

Commit 4cd3d9c

Browse files
committed
refactor: 增加异步逻辑
1 parent 406a9db commit 4cd3d9c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/BootstrapBlazor.PdfViewer/PdfViewer.razor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export async function init(id, invoke, options) {
99
Data.set(id, pdfViewer);
1010

1111
const url = el.getAttribute('data-bb-url');
12-
loadPdf(id, url);
12+
await loadPdf(id, url);
1313
}
1414

15-
export function loadPdf(id, url) {
15+
export async function loadPdf(id, url) {
1616
const pdfViewer = Data.get(id);
1717
const { el, invoke, options } = pdfViewer;
1818

0 commit comments

Comments
 (0)