Skip to content

Commit 84ef010

Browse files
committed
refactor: 移除 init 样式以及逻辑
1 parent 6aad1df commit 84ef010

3 files changed

Lines changed: 1 addition & 10 deletions

File tree

src/components/BootstrapBlazor.PdfReader/PdfReader.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div @attributes="@AdditionalAttributes" id="@Id" class="@ClassString" style="@StyleString">
66
@if (ShowToolbar)
77
{
8-
<div class="bb-view-toolbar init">
8+
<div class="bb-view-toolbar">
99
<div class="bb-view-title">
1010
<div class="bb-view-icon bb-view-bar"><i class="fa-solid fa-bars"></i></div>
1111
<span class="bb-view-subject">@_docTitle</span>

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
color: #fff;
1515
}
1616

17-
.bb-view-toolbar.init > div {
18-
visibility: hidden;
19-
}
20-
2117
.bb-view-toolbar .btn {
2218
--bs-btn-color: #fff;
2319
}

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ const addEventListener = (el, pdfViewer, eventBus, invoke, options) => {
9393
countEl.innerHTML = numPages;
9494
}
9595

96-
const toolbarEl = el.querySelector(".bb-view-toolbar");
97-
if (toolbarEl) {
98-
toolbarEl.classList.remove("init");
99-
}
100-
10196
if (options.triggerPagesInit === true) {
10297
await invoke.invokeMethodAsync("PagesInit", numPages);
10398
}

0 commit comments

Comments
 (0)