Skip to content

Commit dfbb5c1

Browse files
committed
refactor: 实现组件逻辑
1 parent 7458079 commit dfbb5c1

4 files changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Razor">
2+
3+
<PropertyGroup>
4+
<Version>10.0.0</Version>
5+
</PropertyGroup>
6+
7+
<PropertyGroup>
8+
<PackageTags>Bootstrap Blazor WebAssembly wasm UI Components Pdf Viewer</PackageTags>
9+
<Description>Bootstrap UI components extensions of PdfViewer</Description>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<Using Include="Microsoft.JSInterop" />
18+
</ItemGroup>
19+
20+
<ItemGroup>
21+
<Using Include="BootstrapBlazor.Components" />
22+
</ItemGroup>
23+
24+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@namespace BootstrapBlazor.Components
2+
@inherits BootstrapModuleComponentBase
3+
4+
<div @attributes="@AdditionalAttributes" id="@Id" style="height: 600px;"></div>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Microsoft.AspNetCore.Components;
2+
3+
namespace BootstrapBlazor.Components;
4+
5+
/// <summary>
6+
/// EmbedPDF 组件
7+
/// </summary>
8+
[JSModuleAutoLoader("./_content/BootstrapBlazor.EmbedPDF/EmbedPDF.razor.js", JSObjectReference = true)]
9+
public partial class EmbedPDF
10+
{
11+
/// <summary>
12+
/// 获得/设置 PDF 文档路径
13+
/// </summary>
14+
[Parameter]
15+
public string? Url { get; set; }
16+
17+
/// <summary>
18+
/// 获得/设置 PDF 组件高度 默认 600px
19+
/// </summary>
20+
[Parameter]
21+
public string? ViewHeight { get; set; }
22+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@using Microsoft.AspNetCore.Components.Web

0 commit comments

Comments
 (0)