From 3e039047b91511f4986b2c6c7dbd1a5a26c422e0 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 24 Jun 2025 10:24:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?wip:=20=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Conflicts: # BootstrapBlazor.Extensions.sln --- BootstrapBlazor.Extensions.sln | 14 +++ ...ootstrapBlazor.OfficeDocumentViewer.csproj | 21 ++++ .../OfficeDocumentViewer.razor | 5 + .../OfficeDocumentViewer.razor.cs | 103 ++++++++++++++++++ .../OfficeDocumentViewer.razor.js | 37 +++++++ .../_Imports.razor | 2 + .../wwwroot/office-viewer.css | 9 ++ 7 files changed, 191 insertions(+) create mode 100644 src/components/BootstrapBlazor.OfficeDocumentViewer/BootstrapBlazor.OfficeDocumentViewer.csproj create mode 100644 src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor create mode 100644 src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs create mode 100644 src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.js create mode 100644 src/components/BootstrapBlazor.OfficeDocumentViewer/_Imports.razor create mode 100644 src/components/BootstrapBlazor.OfficeDocumentViewer/wwwroot/office-viewer.css diff --git a/BootstrapBlazor.Extensions.sln b/BootstrapBlazor.Extensions.sln index d5ae678a..f69f1934 100644 --- a/BootstrapBlazor.Extensions.sln +++ b/BootstrapBlazor.Extensions.sln @@ -192,6 +192,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.PdfViewer", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.Vditor", "src\components\BootstrapBlazor.Vditor\BootstrapBlazor.Vditor.csproj", "{D417E1B9-D146-4983-81D0-79F3193B322B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.TouchSocket", "src\extensions\BootstrapBlazor.TouchSocket\BootstrapBlazor.TouchSocket.csproj", "{FD23CEA1-78EB-85D7-8EDF-047657355B52}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.OfficeDocumentViewer", "src\components\BootstrapBlazor.OfficeDocumentViewer\BootstrapBlazor.OfficeDocumentViewer.csproj", "{B2B4B85C-06AE-411C-8E29-C9A4AF473548}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -522,6 +526,14 @@ Global {D417E1B9-D146-4983-81D0-79F3193B322B}.Debug|Any CPU.Build.0 = Debug|Any CPU {D417E1B9-D146-4983-81D0-79F3193B322B}.Release|Any CPU.ActiveCfg = Release|Any CPU {D417E1B9-D146-4983-81D0-79F3193B322B}.Release|Any CPU.Build.0 = Release|Any CPU + {FD23CEA1-78EB-85D7-8EDF-047657355B52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD23CEA1-78EB-85D7-8EDF-047657355B52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD23CEA1-78EB-85D7-8EDF-047657355B52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD23CEA1-78EB-85D7-8EDF-047657355B52}.Release|Any CPU.Build.0 = Release|Any CPU + {B2B4B85C-06AE-411C-8E29-C9A4AF473548}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2B4B85C-06AE-411C-8E29-C9A4AF473548}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2B4B85C-06AE-411C-8E29-C9A4AF473548}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2B4B85C-06AE-411C-8E29-C9A4AF473548}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -612,6 +624,8 @@ Global {08458CA3-BF81-48E8-870D-9389DC037808} = {FF1089BE-C704-4374-B629-C57C08E1798F} {4757B038-70E4-40B0-9B73-700EE5632B07} = {FF1089BE-C704-4374-B629-C57C08E1798F} {D417E1B9-D146-4983-81D0-79F3193B322B} = {FF1089BE-C704-4374-B629-C57C08E1798F} + {FD23CEA1-78EB-85D7-8EDF-047657355B52} = {7B29E81D-92DE-46C8-8EDC-1B48C8F12BC2} + {B2B4B85C-06AE-411C-8E29-C9A4AF473548} = {FF1089BE-C704-4374-B629-C57C08E1798F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D5EB1960-6F30-4CE1-B375-EAE1F787D6FF} diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/BootstrapBlazor.OfficeDocumentViewer.csproj b/src/components/BootstrapBlazor.OfficeDocumentViewer/BootstrapBlazor.OfficeDocumentViewer.csproj new file mode 100644 index 00000000..0f96d940 --- /dev/null +++ b/src/components/BootstrapBlazor.OfficeDocumentViewer/BootstrapBlazor.OfficeDocumentViewer.csproj @@ -0,0 +1,21 @@ + + + + 9.0.0 + + + + Bootstrap Blazor WebAssembly wasm UI Components Office Viewer + Bootstrap UI components extensions of Microsoft Office Documentation Viewer + + + + + + + + + + + + diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor b/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor new file mode 100644 index 00000000..b12ca85d --- /dev/null +++ b/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor @@ -0,0 +1,5 @@ +@namespace BootstrapBlazor.Components +@inherits BootstrapModuleComponentBase +@attribute [JSModuleAutoLoader("./_content/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.js", JSObjectReference = true, AutoInvokeDispose = false)] + +
diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs b/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs new file mode 100644 index 00000000..14cd3192 --- /dev/null +++ b/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs @@ -0,0 +1,103 @@ +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Website: https://www.blazor.zone or https://argozhang.github.io/ + +using Microsoft.AspNetCore.Components; + +namespace BootstrapBlazor.Components; + +public partial class OfficeDocumentViewer +{ + /// + /// Gets or sets the url for the PDF file to be displayed. + /// + [Parameter] + public string? Url { get; set; } + + /// + /// Gets or sets the viewer height. Default is null. + /// + [Parameter] + public string? Height { get; set; } + + /// + /// Gets or sets the document loaded event callback. + /// + [Parameter] + public Func? OnLoaded { get; set; } + + [Inject, NotNull] + private NavigationManager? NavigationManager { get; set; } + + private string? ClassString => CssBuilder.Default("bb-office-viewer-container") + .AddClassFromAttributes(AdditionalAttributes) + .Build(); + + private string? StyleString => CssBuilder.Default() + .AddClass($"--bb-office-viewer-height: {Height};", !string.IsNullOrEmpty(Height)) + .Build(); + + private string? _url; + + /// + /// + /// + /// + /// + protected override async Task OnAfterRenderAsync(bool firstRender) + { + await base.OnAfterRenderAsync(firstRender); + + if (firstRender) + { + _url = Url; + return; + } + + var rerender = false; + if (_url != Url) + { + _url = Url; + rerender = true; + } + + if (rerender) + { + await InvokeVoidAsync("load", Id, GetAbsoluteUri(_url)); + } + } + + /// + /// + /// + /// + protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, new + { + LoadedCallaback = nameof(TriggerOnLoaded), + Url = GetAbsoluteUri(Url) + }); + + private string GetAbsoluteUri(string? url) + { + url ??= string.Empty; + if (string.IsNullOrEmpty(url)) + { + return url; + } + var uri = NavigationManager.ToAbsoluteUri(url); + return uri.AbsoluteUri; + } + + /// + /// Trigger OnLoaded callback when the PDF document is loaded. + /// + /// + [JSInvokable] + public async Task TriggerOnLoaded() + { + if (OnLoaded != null) + { + await OnLoaded(); + } + } +} diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.js b/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.js new file mode 100644 index 00000000..b9f8b87f --- /dev/null +++ b/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.js @@ -0,0 +1,37 @@ +import { addLink } from "../BootstrapBlazor/modules/utility.js" +import Data from "../BootstrapBlazor/modules/data.js" + +export async function init(id, invoke, options) { + await addLink("./_content/BootstrapBlazor.OfficeDocumentViewer/office-viewer.css"); + + const el = document.getElementById(id); + const officeViewer = { el, invoke, options }; + Data.set(id, officeViewer); + + await load(id, options.url); +} + +export async function load(id, url) { + const officeViewer = Data.get(id); + const { el, invoke, options } = officeViewer; + + el.innerHTML = ''; + + if (url) { + const { frame } = officeViewer; + const viewer = frame || createFrame(el); + if (options.loadedCallaback) { + viewer.onload = () => { + invoke.invokeMethodAsync(options.loadedCallaback); + }; + } + viewer.src = `https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(url)}`; + } +} + +const createFrame = el => { + const frame = document.createElement('iframe'); + frame.classList.add('bb-office-viewer'); + el.appendChild(frame); + return frame; +} diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/_Imports.razor b/src/components/BootstrapBlazor.OfficeDocumentViewer/_Imports.razor new file mode 100644 index 00000000..d46585f8 --- /dev/null +++ b/src/components/BootstrapBlazor.OfficeDocumentViewer/_Imports.razor @@ -0,0 +1,2 @@ +@using BootstrapBlazor.Components; +@using Microsoft.AspNetCore.Components.Web diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/wwwroot/office-viewer.css b/src/components/BootstrapBlazor.OfficeDocumentViewer/wwwroot/office-viewer.css new file mode 100644 index 00000000..0cdbffd0 --- /dev/null +++ b/src/components/BootstrapBlazor.OfficeDocumentViewer/wwwroot/office-viewer.css @@ -0,0 +1,9 @@ +.bb-office-viewer-container { + width: 100%; + height: var(--bb-office-viewer-height, 500px); +} + +.bb-office-viewer { + width: 100%; + height: 100%; +} From 56013e3fdab97118d1b01b4e63bb5bf84f4dba9e Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 24 Jun 2025 10:58:28 +0800 Subject: [PATCH 2/4] =?UTF-8?q?doc:=20=E5=A2=9E=E5=8A=A0=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficeDocumentViewer.razor.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs b/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs index 14cd3192..89953709 100644 --- a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs +++ b/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs @@ -6,10 +6,16 @@ namespace BootstrapBlazor.Components; +/// +/// Represents a viewer component for displaying Office documents in a web application. +/// +/// The component allows users to display Office files such as Word, +/// Excel, or PowerPoint documents. It provides configurable options for the document URL, viewer height, and a callback +/// for when the document is loaded. public partial class OfficeDocumentViewer { /// - /// Gets or sets the url for the PDF file to be displayed. + /// Gets or sets the url for the Office file to be displayed. /// [Parameter] public string? Url { get; set; } From 4bd817c1ff66d6c667e625be8035e3b798f2258a Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 24 Jun 2025 11:05:53 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E9=87=8D=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BootstrapBlazor.Extensions.sln | 12 ++++++------ .../BootstrapBlazor.OfficeViewer.csproj} | 0 .../OfficeViewer.razor} | 2 +- .../OfficeViewer.razor.cs} | 4 ++-- .../OfficeViewer.razor.js} | 0 .../_Imports.razor | 0 .../wwwroot/office-viewer.css | 0 7 files changed, 9 insertions(+), 9 deletions(-) rename src/components/{BootstrapBlazor.OfficeDocumentViewer/BootstrapBlazor.OfficeDocumentViewer.csproj => BootstrapBlazor.OfficeViewer/BootstrapBlazor.OfficeViewer.csproj} (100%) rename src/components/{BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor => BootstrapBlazor.OfficeViewer/OfficeViewer.razor} (70%) rename src/components/{BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs => BootstrapBlazor.OfficeViewer/OfficeViewer.razor.cs} (94%) rename src/components/{BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.js => BootstrapBlazor.OfficeViewer/OfficeViewer.razor.js} (100%) rename src/components/{BootstrapBlazor.OfficeDocumentViewer => BootstrapBlazor.OfficeViewer}/_Imports.razor (100%) rename src/components/{BootstrapBlazor.OfficeDocumentViewer => BootstrapBlazor.OfficeViewer}/wwwroot/office-viewer.css (100%) diff --git a/BootstrapBlazor.Extensions.sln b/BootstrapBlazor.Extensions.sln index f69f1934..f062a7e4 100644 --- a/BootstrapBlazor.Extensions.sln +++ b/BootstrapBlazor.Extensions.sln @@ -194,7 +194,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.Vditor", "s EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.TouchSocket", "src\extensions\BootstrapBlazor.TouchSocket\BootstrapBlazor.TouchSocket.csproj", "{FD23CEA1-78EB-85D7-8EDF-047657355B52}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.OfficeDocumentViewer", "src\components\BootstrapBlazor.OfficeDocumentViewer\BootstrapBlazor.OfficeDocumentViewer.csproj", "{B2B4B85C-06AE-411C-8E29-C9A4AF473548}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.OfficeViewer", "src\components\BootstrapBlazor.OfficeViewer\BootstrapBlazor.OfficeViewer.csproj", "{2436940C-5920-D801-8A81-721F4C20A355}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -530,10 +530,10 @@ Global {FD23CEA1-78EB-85D7-8EDF-047657355B52}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD23CEA1-78EB-85D7-8EDF-047657355B52}.Release|Any CPU.ActiveCfg = Release|Any CPU {FD23CEA1-78EB-85D7-8EDF-047657355B52}.Release|Any CPU.Build.0 = Release|Any CPU - {B2B4B85C-06AE-411C-8E29-C9A4AF473548}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B2B4B85C-06AE-411C-8E29-C9A4AF473548}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B2B4B85C-06AE-411C-8E29-C9A4AF473548}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B2B4B85C-06AE-411C-8E29-C9A4AF473548}.Release|Any CPU.Build.0 = Release|Any CPU + {2436940C-5920-D801-8A81-721F4C20A355}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2436940C-5920-D801-8A81-721F4C20A355}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2436940C-5920-D801-8A81-721F4C20A355}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2436940C-5920-D801-8A81-721F4C20A355}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -625,7 +625,7 @@ Global {4757B038-70E4-40B0-9B73-700EE5632B07} = {FF1089BE-C704-4374-B629-C57C08E1798F} {D417E1B9-D146-4983-81D0-79F3193B322B} = {FF1089BE-C704-4374-B629-C57C08E1798F} {FD23CEA1-78EB-85D7-8EDF-047657355B52} = {7B29E81D-92DE-46C8-8EDC-1B48C8F12BC2} - {B2B4B85C-06AE-411C-8E29-C9A4AF473548} = {FF1089BE-C704-4374-B629-C57C08E1798F} + {2436940C-5920-D801-8A81-721F4C20A355} = {FF1089BE-C704-4374-B629-C57C08E1798F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D5EB1960-6F30-4CE1-B375-EAE1F787D6FF} diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/BootstrapBlazor.OfficeDocumentViewer.csproj b/src/components/BootstrapBlazor.OfficeViewer/BootstrapBlazor.OfficeViewer.csproj similarity index 100% rename from src/components/BootstrapBlazor.OfficeDocumentViewer/BootstrapBlazor.OfficeDocumentViewer.csproj rename to src/components/BootstrapBlazor.OfficeViewer/BootstrapBlazor.OfficeViewer.csproj diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor b/src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor similarity index 70% rename from src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor rename to src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor index b12ca85d..c713d001 100644 --- a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor +++ b/src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor @@ -1,5 +1,5 @@ @namespace BootstrapBlazor.Components @inherits BootstrapModuleComponentBase -@attribute [JSModuleAutoLoader("./_content/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.js", JSObjectReference = true, AutoInvokeDispose = false)] +@attribute [JSModuleAutoLoader("./_content/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.js", JSObjectReference = true, AutoInvokeDispose = false)]
diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs b/src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.cs similarity index 94% rename from src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs rename to src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.cs index 89953709..66b60a85 100644 --- a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.cs +++ b/src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.cs @@ -9,10 +9,10 @@ namespace BootstrapBlazor.Components; /// /// Represents a viewer component for displaying Office documents in a web application. /// -/// The component allows users to display Office files such as Word, +/// The component allows users to display Office files such as Word, /// Excel, or PowerPoint documents. It provides configurable options for the document URL, viewer height, and a callback /// for when the document is loaded. -public partial class OfficeDocumentViewer +public partial class OfficeViewer { /// /// Gets or sets the url for the Office file to be displayed. diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.js b/src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.js similarity index 100% rename from src/components/BootstrapBlazor.OfficeDocumentViewer/OfficeDocumentViewer.razor.js rename to src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.js diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/_Imports.razor b/src/components/BootstrapBlazor.OfficeViewer/_Imports.razor similarity index 100% rename from src/components/BootstrapBlazor.OfficeDocumentViewer/_Imports.razor rename to src/components/BootstrapBlazor.OfficeViewer/_Imports.razor diff --git a/src/components/BootstrapBlazor.OfficeDocumentViewer/wwwroot/office-viewer.css b/src/components/BootstrapBlazor.OfficeViewer/wwwroot/office-viewer.css similarity index 100% rename from src/components/BootstrapBlazor.OfficeDocumentViewer/wwwroot/office-viewer.css rename to src/components/BootstrapBlazor.OfficeViewer/wwwroot/office-viewer.css From 63a365f80122ca617cdc47918cf990befb936162 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 24 Jun 2025 11:08:06 +0800 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BootstrapBlazor.OfficeViewer/OfficeViewer.razor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.js b/src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.js index b9f8b87f..0337f9d4 100644 --- a/src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.js +++ b/src/components/BootstrapBlazor.OfficeViewer/OfficeViewer.razor.js @@ -2,7 +2,7 @@ import Data from "../BootstrapBlazor/modules/data.js" export async function init(id, invoke, options) { - await addLink("./_content/BootstrapBlazor.OfficeDocumentViewer/office-viewer.css"); + await addLink("./_content/BootstrapBlazor.OfficeViewer/office-viewer.css"); const el = document.getElementById(id); const officeViewer = { el, invoke, options };