Skip to content

Commit f8827f5

Browse files
authored
chore(JSModule): update javascript path (#4767)
* wip: 更新路径问题 * refactor: 更新脚本路径 * chore: 更正图标样式 * style: 更新图标路径 * chore: 更新 JS 路径 * chore: 更新加载文件路径 * refactor: 更新路径为相对路径 * chore: 更新路径
1 parent f37d81e commit f8827f5

File tree

15 files changed

+33
-27
lines changed

15 files changed

+33
-27
lines changed

src/BootstrapBlazor.Server/Components/App.razor

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@
2424
}
2525
else
2626
{
27+
<link rel="stylesheet" href="_content/BootstrapBlazor.AntDesignIcon/BootstrapBlazor.AntDesignIcon.bundle.scp.css" />
28+
<link rel="stylesheet" href="_content/BootstrapBlazor.BootstrapIcon/css/bootstrap.min.css" />
29+
<link rel="stylesheet" href="_content/BootstrapBlazor.ElementIcon/BootstrapBlazor.ElementIcon.bundle.scp.css" />
2730
<link rel="stylesheet" href="_content/BootstrapBlazor.FontAwesome/css/font-awesome.min.css" />
2831
<link rel="stylesheet" href="_content/BootstrapBlazor.MaterialDesign/css/md.min.css" />
29-
<link rel="stylesheet" href="_content/BootstrapBlazor.BootstrapIcon/css/bootstrap.min.css" />
32+
<link rel="stylesheet" href="_content/BootstrapBlazor.IconPark/BootstrapBlazor.IconPark.bundle.scp.css" />
3033
<link rel="stylesheet" href="_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css" />
3134
<link rel="stylesheet" href="_content/BootstrapBlazor/css/motronic.min.css" />
3235
<link rel="stylesheet" href="_content/BootstrapBlazor.Shared/BootstrapBlazor.Shared.bundle.scp.css" />
@@ -50,7 +53,7 @@
5053
@if (Env.IsProduction())
5154
{
5255
<script type="text/javascript" src="https://cdn.wwads.cn/js/makemoney.js"></script>
53-
<script type="text/javascript" src="lib/wwads/wwads.js"></script>
56+
<script type="text/javascript" src="./_content/BootstrapBlazor.Shared/lib/wwads/wwads.js"></script>
5457
<script>
5558
var _hmt = _hmt || [];
5659
(function () {

src/BootstrapBlazor.Server/Extensions/StaticFileResponseContextExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ public static RenderFragment RenderAssets(this ComponentBase component) => build
3636
var v = pi.GetValue(component);
3737
if (v is ResourceAssetCollection assets)
3838
{
39+
builder.RenderCss($"{assets["_content/BootstrapBlazor.AntDesignIcon/BootstrapBlazor.AntDesignIcon.bundle.scp.css"]}");
40+
builder.RenderCss($"{assets["_content/BootstrapBlazor.BootstrapIcon/css/bootstrap.min.css"]}");
41+
builder.RenderCss($"{assets["_content/BootstrapBlazor.ElementIcon/BootstrapBlazor.ElementIcon.bundle.scp.css"]}");
3942
builder.RenderCss($"{assets["_content/BootstrapBlazor.FontAwesome/css/font-awesome.min.css"]}");
4043
builder.RenderCss($"{assets["_content/BootstrapBlazor.MaterialDesign/css/md.min.css"]}");
41-
builder.RenderCss($"{assets["_content/BootstrapBlazor.BootstrapIcon/css/bootstrap.min.css"]}");
44+
builder.RenderCss($"{assets["_content/BootstrapBlazor.IconPark/BootstrapBlazor.IconPark.bundle.scp.css"]}");
4245
builder.RenderCss($"{assets["_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css"]}");
4346
builder.RenderCss($"{assets["_content/BootstrapBlazor/css/motronic.min.css"]}");
4447
builder.RenderCss($"{assets["_content/BootstrapBlazor.Shared/BootstrapBlazor.Shared.bundle.scp.css"]}");

src/BootstrapBlazor.Shared/BootstrapBlazor.Shared.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Razor">
1+
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<ItemGroup>
44
<Content Remove="docs.json" />
@@ -47,7 +47,7 @@
4747
<PackageReference Include="BootstrapBlazor.MaterialDesign" Version="9.0.0" />
4848
<PackageReference Include="BootstrapBlazor.MaterialDesign.Extensions" Version="9.0.0" />
4949
<PackageReference Include="BootstrapBlazor.MeiliSearch" Version="9.0.4" />
50-
<PackageReference Include="BootstrapBlazor.Mermaid" Version="9.0.1-beta01" />
50+
<PackageReference Include="BootstrapBlazor.Mermaid" Version="9.0.1" />
5151
<PackageReference Include="BootstrapBlazor.MindMap" Version="9.0.0" />
5252
<PackageReference Include="BootstrapBlazor.MouseFollower" Version="9.0.0" />
5353
<PackageReference Include="BootstrapBlazor.OnScreenKeyboard" Version="9.0.0" />
@@ -61,7 +61,7 @@
6161
<PackageReference Include="BootstrapBlazor.TableExport" Version="9.0.0" />
6262
<PackageReference Include="BootstrapBlazor.TagHelper" Version="9.0.0" />
6363
<PackageReference Include="BootstrapBlazor.Topology" Version="9.0.0" />
64-
<PackageReference Include="BootstrapBlazor.VideoPlayer" Version="9.0.0" />
64+
<PackageReference Include="BootstrapBlazor.VideoPlayer" Version="9.0.1" />
6565
<PackageReference Include="BootstrapBlazor.WinBox" Version="9.0.5" />
6666
</ItemGroup>
6767

src/BootstrapBlazor.Shared/Components/Layout/DockLayout.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
3333
{
3434
if (firstRender)
3535
{
36-
Module = await JSRuntime.LoadModule("./Components/Layout/DockLayout.razor.js");
36+
Module = await JSRuntime.LoadModule("./_content/BootstrapBlazor.Shared/Components/Layout/DockLayout.razor.js");
3737
await Module.InvokeVoidAsync("init");
3838
}
3939
}

src/BootstrapBlazor.Shared/Components/Samples/Charts/Line.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace BootstrapBlazor.Shared.Components.Samples.Charts;
1010
/// <summary>
1111
/// Line 图表示例
1212
/// </summary>
13-
[JSModuleAutoLoader("Samples/Charts/Line.razor.js", JSObjectReference = true)]
13+
[JSModuleAutoLoader("../_content/BootstrapBlazor.Shared/Components/Samples/Charts/Line.razor.js", JSObjectReference = true)]
1414
public partial class Line : IDisposable
1515
{
1616
private readonly Random _randomer = new();

src/BootstrapBlazor.Shared/Components/Samples/Charts/Line.razor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//通过相对路径导入BootstrapBlazor.Chart的Chart.JS模块
2-
import '../../../_content/BootstrapBlazor.Chart/js/chart.umd.js'
3-
import Data from '../../../_content/BootstrapBlazor/modules/data.js'
2+
import '../../../../BootstrapBlazor.Chart/js/chart.umd.js'
3+
import Data from '../../../../BootstrapBlazor/modules/data.js'
44

55
export function init(id, chartData) {
66
const ctx = document.getElementById(id);

src/BootstrapBlazor.Shared/Components/Samples/Icons/AntDesignIconList.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace BootstrapBlazor.Shared.Components.Samples.Icons;
88
/// <summary>
99
/// AntDesignIconList 组件
1010
/// </summary>
11-
[JSModuleAutoLoader("Samples/Icons/AntDesignIconList.razor.js")]
11+
[JSModuleAutoLoader("../_content/BootstrapBlazor.Shared/Components/Samples/Icons/AntDesignIconList.razor.js")]
1212
public partial class AntDesignIconList
1313
{
1414
private string? ClassString => CssBuilder.Default("icon-list")

src/BootstrapBlazor.Shared/Components/Samples/Icons/AntDesignIconList.razor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { copy } from "../../../_content/BootstrapBlazor/modules/utility.js"
2-
import Data from "../../../_content/BootstrapBlazor/modules/data.js"
3-
import EventHandler from "../../../_content/BootstrapBlazor/modules/event-handler.js"
1+
import { copy } from "../../../../BootstrapBlazor/modules/utility.js"
2+
import Data from "../../../../BootstrapBlazor/modules/data.js"
3+
import EventHandler from "../../../../BootstrapBlazor/modules/event-handler.js"
44

55
export function init(id) {
66
const el = document.getElementById(id);

src/BootstrapBlazor.Shared/Components/Samples/Icons/ElementIconList.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace BootstrapBlazor.Shared.Components.Samples.Icons;
88
/// <summary>
99
/// ElementIconList 组件
1010
/// </summary>
11-
[JSModuleAutoLoader("Samples/Icons/ElementIconList.razor.js")]
11+
[JSModuleAutoLoader("../_content/BootstrapBlazor.Shared/Components/Samples/Icons/ElementIconList.razor.js")]
1212
public partial class ElementIconList
1313
{
1414
private string? ClassString => CssBuilder.Default("icon-list")

src/BootstrapBlazor.Shared/Components/Samples/Icons/ElementIconList.razor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { copy } from "../../../_content/BootstrapBlazor/modules/utility.js"
2-
import Data from "../../../_content/BootstrapBlazor/modules/data.js"
3-
import EventHandler from "../../../_content/BootstrapBlazor/modules/event-handler.js"
1+
import { copy } from "../../../../BootstrapBlazor/modules/utility.js"
2+
import Data from "../../../../BootstrapBlazor/modules/data.js"
3+
import EventHandler from "../../../../BootstrapBlazor/modules/event-handler.js"
44

55
export function init(id) {
66
const el = document.getElementById(id);

0 commit comments

Comments
 (0)