diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99afbd883..11ba20e20 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Package to Nuget +name: Package Extensions to Nuget on: push: diff --git a/src/BootstrapBlazor.Shared/Extensions/WebsiteOptions.cs b/src/BootstrapBlazor.Shared/Extensions/WebsiteOptions.cs index 39feecd39..1dd423a04 100644 --- a/src/BootstrapBlazor.Shared/Extensions/WebsiteOptions.cs +++ b/src/BootstrapBlazor.Shared/Extensions/WebsiteOptions.cs @@ -54,6 +54,11 @@ namespace BootstrapBlazor.Shared /// public string RepositoryUrl { get; set; } = "https://gitee.com/LongbowEnterprise/BootstrapBlazor/raw/dev/src/BootstrapBlazor.Shared/Pages/Samples/"; + /// + /// + /// + public string WikiUrl { get; set; } = "https://gitee.com/LongbowEnterprise/BootstrapBlazor/wikis/Home"; + /// /// 获得 QQ 1 群链接地址 /// diff --git a/src/BootstrapBlazor.Shared/Pages/Introduction.razor b/src/BootstrapBlazor.Shared/Pages/Introduction.razor index 4399234f8..4d676f803 100644 --- a/src/BootstrapBlazor.Shared/Pages/Introduction.razor +++ b/src/BootstrapBlazor.Shared/Pages/Introduction.razor @@ -1,6 +1,7 @@ @page "/docs" @page "/introduction" @inject IOptions WebsiteOption +@implements IAsyncDisposable

简介

@@ -12,11 +13,39 @@

最新 项目模板 中将以上依赖进行了打包捆绑大大简化使用

+

更新日志

+ +

+ 本组件目前每天可能有 beta 版本发布,每 周四 发布 正式版 更新日志 + [传送门] +

+

学习资料

作品展示

@@ -44,4 +73,27 @@

交流群

+ + +@code { + [Inject] + [NotNull] + private IJSRuntime? JSRuntime { get; set; } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + await base.OnAfterRenderAsync(firstRender); + + if (firstRender) + { + await JSRuntime.InvokeVoidAsync("$.bb_open"); + } + } + + public async ValueTask DisposeAsync() + { + await JSRuntime.InvokeVoidAsync("$.bb_open", "dispose"); + GC.SuppressFinalize(this); + } +} diff --git a/src/BootstrapBlazor.Shared/Pages/Samples/Uploads.razor b/src/BootstrapBlazor.Shared/Pages/Samples/Uploads.razor index a0e50d49c..82bcdb513 100644 --- a/src/BootstrapBlazor.Shared/Pages/Samples/Uploads.razor +++ b/src/BootstrapBlazor.Shared/Pages/Samples/Uploads.razor @@ -2,7 +2,7 @@

Upload 上传

-

通过点击或者拖拽上传文件

+

通过点击上传文件

diff --git a/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor b/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor index e4ecaf865..7f3dc4ac6 100644 --- a/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor +++ b/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor @@ -43,35 +43,10 @@ @Body -
- - + diff --git a/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor.cs b/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor.cs index 40b301cd0..174bdc385 100644 --- a/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor.cs +++ b/src/BootstrapBlazor.Shared/Shared/BaseLayout.razor.cs @@ -16,6 +16,8 @@ namespace BootstrapBlazor.Shared.Shared /// public partial class BaseLayout { + private ElementReference MsLearnElement { get; set; } + [Inject] [NotNull] private IStringLocalizer? Localizer { get; set; } @@ -50,7 +52,7 @@ namespace BootstrapBlazor.Shared.Shared private static Action? OnInstallable { get; set; } /// - /// + /// OnInitialized 方法 /// /// protected override void OnInitialized() @@ -69,6 +71,21 @@ namespace BootstrapBlazor.Shared.Shared OnInstallable = () => InvokeAsync(StateHasChanged); } + /// + /// OnAfterRenderAsync 方法 + /// + /// + /// + protected override async Task OnAfterRenderAsync(bool firstRender) + { + await base.OnAfterRenderAsync(firstRender); + + if (firstRender) + { + await JSRuntime.InvokeVoidAsync("$.bb_tooltip_site", MsLearnElement); + } + } + /// /// /// diff --git a/src/BootstrapBlazor.Shared/Shared/NavMenu.razor.cs b/src/BootstrapBlazor.Shared/Shared/NavMenu.razor.cs index 16cbdadf5..d0bdfb439 100644 --- a/src/BootstrapBlazor.Shared/Shared/NavMenu.razor.cs +++ b/src/BootstrapBlazor.Shared/Shared/NavMenu.razor.cs @@ -170,7 +170,6 @@ namespace BootstrapBlazor.Shared.Shared }, new() { - IsNew = true, Text = Localizer["Labels"], Url = "labels" }, @@ -266,7 +265,6 @@ namespace BootstrapBlazor.Shared.Shared }, new() { - IsUpdate = true, Text = Localizer["MultiSelect"], Url = "multiselects" }, @@ -318,7 +316,6 @@ namespace BootstrapBlazor.Shared.Shared }, new() { - IsUpdate = true, Text = Localizer["ValidateForm"], Url = "validateforms" } @@ -389,7 +386,6 @@ namespace BootstrapBlazor.Shared.Shared }, new() { - IsNew = true, Text = Localizer["Display"], Url = "displays" }, @@ -419,11 +415,6 @@ namespace BootstrapBlazor.Shared.Shared Url = "listviews" }, new() - { - Text = Localizer["Popover"], - Url = "popovers" - }, - new() { Text = Localizer["QRCode"], Url = "qrcodes" @@ -446,13 +437,11 @@ namespace BootstrapBlazor.Shared.Shared }, new() { - IsNew = true, Text = Localizer["Title"], Url = "titles" }, new() { - IsNew = true, Text = Localizer["Download"], Url = "downloads" }, @@ -590,6 +579,7 @@ namespace BootstrapBlazor.Shared.Shared }, new() { + IsNew = true, Text = Localizer["TableFooter"], Url = "tables/footer" }, @@ -610,7 +600,6 @@ namespace BootstrapBlazor.Shared.Shared }, new() { - IsNew = true, Text = Localizer["TableLaoding"], Url = "tables/loading" } @@ -669,6 +658,11 @@ namespace BootstrapBlazor.Shared.Shared Url = "popconfirms" }, new() + { + Text = Localizer["Popover"], + Url = "popovers" + }, + new() { Text = Localizer["Progress"], Url = "progresss" diff --git a/src/BootstrapBlazor.Shared/wwwroot/css/site.css b/src/BootstrapBlazor.Shared/wwwroot/css/site.css index 4cc9d8227..9c7ec1ade 100644 --- a/src/BootstrapBlazor.Shared/wwwroot/css/site.css +++ b/src/BootstrapBlazor.Shared/wwwroot/css/site.css @@ -1412,13 +1412,17 @@ section { .ms-learn { position: fixed; bottom: 4rem; - background: #fff; + right: 1rem; + background: #8759ff; box-shadow: 0 0 8px #211b50; overflow: hidden; - border-radius: 5px; + border-radius: 50%; z-index: 2000; - width: 260px; - right: calc(50% - 130px); + width: 40px; + height: 40px; + display: flex; + justify-content: center; + align-items: center; } .ms-learn:hover { @@ -1473,6 +1477,17 @@ section { color: #fff; } + .ms-learn a { + display: flex; + align-items: center; + justify-content: center; + } + + .ms-learn img { + width: 55%; + margin-left: 2px; + } + @media (min-width: 768px) { .ms-learn { right: 1rem; @@ -1607,6 +1622,12 @@ section { border: 1px solid #c0c4cc; } +@media (max-width: 768px) { + .wwads-cn { + display: none; + } +} + .is-right .control-label { text-align: right; } diff --git a/src/BootstrapBlazor.Shared/wwwroot/images/log.svg b/src/BootstrapBlazor.Shared/wwwroot/images/log.svg new file mode 100644 index 000000000..ddef64280 --- /dev/null +++ b/src/BootstrapBlazor.Shared/wwwroot/images/log.svg @@ -0,0 +1 @@ + diff --git a/src/BootstrapBlazor.Shared/wwwroot/js/common.js b/src/BootstrapBlazor.Shared/wwwroot/js/common.js index dca81246d..a8514b2fd 100644 --- a/src/BootstrapBlazor.Shared/wwwroot/js/common.js +++ b/src/BootstrapBlazor.Shared/wwwroot/js/common.js @@ -204,6 +204,19 @@ $link.after('') } } + }, + bb_open: function (method) { + if (method === 'dispose') { + $('#log').popover(method); + } + else { + $('#log').popover({ delay: { 'show': 1000 } }).one('click', function () { + $(this).popover('toggle'); + }).trigger('click'); + } + }, + bb_tooltip_site: function (el) { + $(el).tooltip(); } });