mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2025-12-06 07:28:50 +08:00
feat(PdfReader): add ShowPrint parameter (#7191)
* feat(PdfReader): add OnDownloadAsync function * chore: updated version to 10.0.1-beta06 * feat(PdfReader): add ShowPrint parameter
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
<PackageReference Include="BootstrapBlazor.OfficeViewer" Version="10.0.0" />
|
||||
<PackageReference Include="BootstrapBlazor.OnScreenKeyboard" Version="10.0.0" />
|
||||
<PackageReference Include="BootstrapBlazor.OpcDa" Version="10.0.0" />
|
||||
<PackageReference Include="BootstrapBlazor.PdfReader" Version="10.0.1-beta06" />
|
||||
<PackageReference Include="BootstrapBlazor.PdfReader" Version="10.0.1-beta07" />
|
||||
<PackageReference Include="BootstrapBlazor.PdfViewer" Version="10.0.0" />
|
||||
<PackageReference Include="BootstrapBlazor.Player" Version="10.0.1" />
|
||||
<PackageReference Include="BootstrapBlazor.RDKit" Version="10.0.0" />
|
||||
|
||||
@@ -7,13 +7,27 @@
|
||||
<PackageTips Name="BootstrapBlazor.PdfReader" />
|
||||
|
||||
<DemoBlock Title="@Localizer["PdfReaderNormalText"]" Introduction="@Localizer["PdfReaderNormalIntro"]" Name="Normal">
|
||||
<section ignore class="row form-inline g3">
|
||||
<section ignore class="row form-inline g-3" style="--bb-input-group-label-width: 176px;">
|
||||
<div class="col-12 col-sm-6">
|
||||
<BootstrapInputGroup>
|
||||
<BootstrapInputGroupLabel>ShowDownload</BootstrapInputGroupLabel>
|
||||
<Switch @bind-Value="_showDownload"></Switch>
|
||||
</BootstrapInputGroup>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6">
|
||||
<BootstrapInputGroup>
|
||||
<BootstrapInputGroupLabel>ShowPrint</BootstrapInputGroupLabel>
|
||||
<Switch @bind-Value="_showPrint"></Switch>
|
||||
</BootstrapInputGroup>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6">
|
||||
<BootstrapInputGroup>
|
||||
<BootstrapInputGroupLabel>ShowTwoPagesOneView</BootstrapInputGroupLabel>
|
||||
<Switch @bind-Value="_showTwoPagesOneViewButton"></Switch>
|
||||
<Switch @bind-Value="_showTwoPagesOneView"></Switch>
|
||||
</BootstrapInputGroup>
|
||||
</div>
|
||||
</section>
|
||||
<PdfReader Url="@_url" ShowTwoPagesOneViewButton="_showTwoPagesOneViewButton" ViewHeight="600px" OnDownloadAsync="OnDownloadAsync"></PdfReader>
|
||||
<PdfReader Url="@_url" ShowTwoPagesOneView="_showTwoPagesOneView"
|
||||
ShowDownload="_showDownload" ShowPrint="_showPrint"
|
||||
ViewHeight="600px" OnDownloadAsync="OnDownloadAsync"></PdfReader>
|
||||
</DemoBlock>
|
||||
|
||||
@@ -27,7 +27,9 @@ public partial class PdfReaders
|
||||
[NotNull]
|
||||
PdfReader? PdfReader { get; set; }
|
||||
|
||||
private bool _showTwoPagesOneViewButton = true;
|
||||
private bool _showTwoPagesOneView = true;
|
||||
private bool _showPrint = true;
|
||||
private bool _showDownload = true;
|
||||
private string _url = "./samples/sample.pdf";
|
||||
|
||||
private async Task OnDownloadAsync()
|
||||
|
||||
Reference in New Issue
Block a user