Skip to content

Commit 7b3659b

Browse files
committed
refactor: 增加 tow page one view 功能
1 parent b0a2b75 commit 7b3659b

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/components/BootstrapBlazor.PdfReader/BootstrapBlazor.PdfReader.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<ProjectReference Include="..\..\..\..\BootstrapBlazor\src\BootstrapBlazor\BootstrapBlazor.csproj" />
2120
<!--<PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" />-->
2221
</ItemGroup>
2322

23+
<ItemGroup>
24+
<ProjectReference Include="..\..\..\..\BootstrapBlazor\src\BootstrapBlazor\BootstrapBlazor.csproj" />
25+
</ItemGroup>
26+
2427
<ItemGroup>
2528
<Using Include="Microsoft.JSInterop" />
2629
</ItemGroup>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ const addEventListener = (pdfViewer, eventBus, invoke, options) => {
8383
pdfViewer.currentScaleValue = "page-width";
8484
}
8585
else {
86-
pdfViewer.currentScaleValue = 1.0;
86+
pdfViewer.currentScaleValue = "page-actual";
8787
}
8888

89+
pdfViewer.currentScaleValue = 'auto';
90+
pdfViewer.spreadMode = 1;
91+
8992
const el = pdfViewer.container.parentElement;
9093
const numPages = pdfViewer.pagesCount;
9194
const countEl = el.querySelector(".bb-view-pagesCount");

0 commit comments

Comments
 (0)