From 18d22c163ce08b1259c34d2d8126e9e73c2a04bd Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 10 Jun 2020 23:27:35 +0800 Subject: [PATCH] Update document --- docs/en/CurrentUser.md | 2 +- docs/zh-Hans/Blob-Storing-Azure.md | 1 + docs/zh-Hans/Blob-Storing-Custom-Provider.md | 1 + docs/zh-Hans/Blob-Storing-File-System.md | 1 + docs/zh-Hans/Blob-Storing.md | 1 + docs/zh-Hans/CLI.md | 1 + docs/zh-Hans/Connection-Strings.md | 14 +- docs/zh-Hans/CurrentUser.md | 168 +++++++++++++++++- docs/zh-Hans/Index.md | 4 +- docs/zh-Hans/Startup-Templates/Console.md | 19 ++ docs/zh-Hans/Startup-Templates/Index.md | 3 +- .../UI/Angular/Component-Replacement.md | 4 + ...ission-Management-Component-Replacement.md | 1 + .../UI/AspNetCore/Tag-Helpers/Badges.md | 38 ++++ .../UI/AspNetCore/Tag-Helpers/Borders.md | 124 +++++++++++++ .../UI/AspNetCore/Tag-Helpers/Breadcrumbs.md | 25 +++ .../zh-Hans/UI/AspNetCore/Tag-Helpers/Navs.md | 114 ++++++++++++ .../UI/AspNetCore/Tag-Helpers/Tables.md | 59 ++++++ docs/zh-Hans/docs-nav.json | 30 ++++ 19 files changed, 602 insertions(+), 8 deletions(-) create mode 100644 docs/zh-Hans/Blob-Storing-Azure.md create mode 100644 docs/zh-Hans/Blob-Storing-Custom-Provider.md create mode 100644 docs/zh-Hans/Blob-Storing-File-System.md create mode 100644 docs/zh-Hans/Blob-Storing.md create mode 100644 docs/zh-Hans/Startup-Templates/Console.md create mode 100644 docs/zh-Hans/UI/Angular/Permission-Management-Component-Replacement.md create mode 100644 docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Badges.md create mode 100644 docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Borders.md create mode 100644 docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Breadcrumbs.md create mode 100644 docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Navs.md create mode 100644 docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Tables.md diff --git a/docs/en/CurrentUser.md b/docs/en/CurrentUser.md index f9057dd97e..e4aca40811 100644 --- a/docs/en/CurrentUser.md +++ b/docs/en/CurrentUser.md @@ -59,7 +59,7 @@ Here are the fundamental properties of the `ICurrentUser` interface: * **UserName** (string): User name of the current user. Returns `null`, if the current user has not logged in. * **TenantId** (Guid?): Tenant Id of the current user, which can be useful for a [multi-tenant](Multi-Tenancy.md) application. Returns `null`, if the current user is not assigned to a tenant. * **Email** (string): Email address of the current user.Returns `null`, if the current user has not logged in or not set an email address. -* **EmailVerified** (bool): Returns `true`, if the phone number of the current user has been verified. +* **EmailVerified** (bool): Returns `true`, if the email address of the current user has been verified. * **PhoneNumber** (string): Phone number of the current user. Returns `null`, if the current user has not logged in or not set a phone number. * **PhoneNumberVerified** (bool): Returns `true`, if the phone number of the current user has been verified. * **Roles** (string[]): Roles of the current user. Returns a string array of the role names of the current user. diff --git a/docs/zh-Hans/Blob-Storing-Azure.md b/docs/zh-Hans/Blob-Storing-Azure.md new file mode 100644 index 0000000000..cb82a640d5 --- /dev/null +++ b/docs/zh-Hans/Blob-Storing-Azure.md @@ -0,0 +1 @@ +TODO... \ No newline at end of file diff --git a/docs/zh-Hans/Blob-Storing-Custom-Provider.md b/docs/zh-Hans/Blob-Storing-Custom-Provider.md new file mode 100644 index 0000000000..cb82a640d5 --- /dev/null +++ b/docs/zh-Hans/Blob-Storing-Custom-Provider.md @@ -0,0 +1 @@ +TODO... \ No newline at end of file diff --git a/docs/zh-Hans/Blob-Storing-File-System.md b/docs/zh-Hans/Blob-Storing-File-System.md new file mode 100644 index 0000000000..cb82a640d5 --- /dev/null +++ b/docs/zh-Hans/Blob-Storing-File-System.md @@ -0,0 +1 @@ +TODO... \ No newline at end of file diff --git a/docs/zh-Hans/Blob-Storing.md b/docs/zh-Hans/Blob-Storing.md new file mode 100644 index 0000000000..cb82a640d5 --- /dev/null +++ b/docs/zh-Hans/Blob-Storing.md @@ -0,0 +1 @@ +TODO... \ No newline at end of file diff --git a/docs/zh-Hans/CLI.md b/docs/zh-Hans/CLI.md index c0147aa3a8..788c4a67ed 100644 --- a/docs/zh-Hans/CLI.md +++ b/docs/zh-Hans/CLI.md @@ -87,6 +87,7 @@ abp new Acme.BookStore * `mongodb`: MongoDB. * `module`: [Module template](Startup-Templates/Module.md). 其他选项: * `--no-ui`: 不包含UI.仅创建服务模块(也称为微服务 - 没有UI). + * **`console`**: [Console template](Startup-Templates/Console.md). * `--output-folder` 或者 `-o`: 指定输出文件夹,默认是当前目录. * `--version` 或者 `-v`: 指定ABP和模板的版本.它可以是 [release tag](https://github.com/abpframework/abp/releases) 或者 [branch name](https://github.com/abpframework/abp/branches). 如果没有指定,则使用最新版本.大多数情况下,你会希望使用最新的版本. * `--template-source` 或者 `-ts`: 指定自定义模板源用于生成项目,可以使用本地源和网络源(例如 `D\localTemplate` 或 `https://.zip`). diff --git a/docs/zh-Hans/Connection-Strings.md b/docs/zh-Hans/Connection-Strings.md index 562ae700ce..4694040309 100644 --- a/docs/zh-Hans/Connection-Strings.md +++ b/docs/zh-Hans/Connection-Strings.md @@ -73,8 +73,18 @@ public class IdentityServerDbContext 启动模板(使用 EF Core ORM) 带有一个数据库和一个 `.EntityFrameworkCore.DbMigrations` 项目,其中包含数据库的迁移文件. 该项目主要定义了一个*YourProjectName*MigrationsDbContext,它调用所有模块的 `Configure...()` 方法,例如 `builder.ConfigurePermissionManagement()`. -一旦要分离模块的数据库,通常需要创建第二个迁移路径. 最简单的方法是创建一个带有 `DbContext` 的 `.EntityFrameworkCore.DbMigrations` 项目副本, 更改为只调用需要存储在第二个数据库中的模块的 `Configure...()` 方法并重新创建迁移. 这时你还需要更改 `.DbMigrator` 应用程序使其兼容第二个数据库,这样每个数据库将有一个单独的迁移DbContext. +一旦要分离模块的数据库,通常需要创建第二个迁移路径. 请参阅[EF Core迁移文档](Entity-Framework-Core-Migrations.md)了解如何为所需模块创建和使用其他数据库. ## 多租户 -参阅 [多租户文档](Multi-Tenancy.md)了解如何为租户使用单独的数据库. \ No newline at end of file +参阅 [多租户文档](Multi-Tenancy.md)了解如何为租户使用单独的数据库. + +## 替换连接字符串解析器 + +ABP定义了 `IConnectionStringResolver`,并在需要连接字符串时使用它. 有两个预构建的实现: + +* `DefaultConnectionStringResolver` 根据上面"配置连接字符串"一节中定义的规则,使用 `AbpDbConnectionOptions` 选择连接字符串. +* `MultiTenantConnectionStringResolver` used for multi-tenant applications and tries to get the configured connection string for the current tenant if available. It uses the `ITenantStore` to find the connection strings. It inherits from the `DefaultConnectionStringResolver` and fallbacks to the base logic if no connection string specified for the current tenant. +* `MultiTenantConnectionStringResolver` 用于多租户应用程序,并尝试获取当前租户的已配置连接字符串(如果有). 它使用 `ITenantStore` 查找连接字符串. 它继承了 `DefaultConnectionStringResolver`, 如果没有为当前租户指定连接字符串则回退到基本逻辑. + +如果需要自定义逻辑来确定连接字符串,可以实现 `IConnectionStringResolver` 接口(也可以从现有类派生)并使用[依赖注入](Dependency-Injection.md)系统替换现有实现. \ No newline at end of file diff --git a/docs/zh-Hans/CurrentUser.md b/docs/zh-Hans/CurrentUser.md index b240a4421d..49ebaaaba0 100644 --- a/docs/zh-Hans/CurrentUser.md +++ b/docs/zh-Hans/CurrentUser.md @@ -1,3 +1,167 @@ -# Current User +# 当前用户 -TODO! \ No newline at end of file +在Web应用程序中检索有关已登录用户的信息是很常见的. 当前用户是与Web应用程序中的当前请求相关的活动用户. + +## ICurrentUser + +`ICurrentUser` 是主要的服务,用于获取有关当前活动的用户信息. + +示例: [注入](Dependency-Injection.md) `ICurrentUser` 到服务中: + +````csharp +using System; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Users; + +namespace AbpDemo +{ + public class MyService : ITransientDependency + { + private readonly ICurrentUser _currentUser; + + public MyService(ICurrentUser currentUser) + { + _currentUser = currentUser; + } + + public void Foo() + { + Guid? userId = _currentUser.Id; + } + } +} +```` + +公共基类已经将此服务作为基本属性注入. 例如你可以直接在[应用服务](Application-Services.md)中使用 `CurrentUser` 属性: + +````csharp +using System; +using Volo.Abp.Application.Services; + +namespace AbpDemo +{ + public class MyAppService : ApplicationService + { + public void Foo() + { + Guid? userId = CurrentUser.Id; + } + } +} +```` + +### 属性 + +以下是 `ICurrentUser` 接口的基本属性: + +* **IsAuthenticated** 如果当前用户已登录(已认证),则返回 `true`. 如果用户尚未登录,则 `Id` 和 `UserName` 将返回 `null`. +* **Id** (Guid?): 当前用户的Id,如果用户未登录,返回 `null`. +* **UserName** (string): 当前用户的用户名称. 如果用户未登录,返回 `null`. +* **TenantId** (Guid?): 当前用户的租户Id. 对于[多租户](Multi-Tenancy.md) 应用程序很有用. 如果当前用户未分配给租户,返回 `null`. +* **Email** (string): 当前用户的电子邮件地址. 如果当前用户尚未登录或未设置电子邮件地址,返回 `null`. +* **EmailVerified** (bool): 如果当前用户的电子邮件地址已经过验证,返回 `true`. +* **PhoneNumber** (string): 当前用户的电话号码. 如果当前用户尚未登录或未设置电话号码,返回 `null`. +* **PhoneNumberVerified** (bool): 如果当前用户的电话号码已经过验证,返回 `true`. +* **Roles** (string[]): 当前用户的角色. 返回当前用户角色名称的字符串数组. + +### Methods + +`ICurrentUser` 是在 `ICurrentPrincipalAccessor` 上实现的(请参阅以下部分),并可以处理声明. 实际上所有上述属性都是从当前经过身份验证的用户的声明中检索的. + +如果你有自定义声明或获取其他非常见声明类型, `ICurrentUser` 有一些直接使用声明的方法. + +* **FindClaim**: 获取给定名称的声明,如果未找到返回 `null`. +* **FindClaims**: 获取具有给定名称的所有声明(允许具有相同名称的多个声明值). +* **GetAllClaims**: 获取所有声明. +* **IsInRole**: 一种检查当前用户是否在指定角色中的简化方法. + +除了这些标准方法,还有一些扩展方法: + +* **FindClaimValue**: 获取具有给定名称的声明的值,如果未找到返回 `null`. 它有一个泛型重载将值强制转换为特定类型. +* **GetId**: 返回当前用户的 `Id`. 如果当前用户没有登录它会抛出一个异常(而不是返回`null`). 仅在你确定用户已经在你的代码上下文中进行了身份验证时才使用此选项. + +### 验证和授权 + +`ICurrentUser` 的工作方式与用户的身份验证或授权方式无关. 它可以与使用当前主体的任何身份验证系统无缝地配合使用(请参阅下面的部分). + +## ICurrentPrincipalAccessor + +`ICurrentPrincipalAccessor` 是当需要当前用户的principle时使用的服务(由ABP框架和你的应用程序代码使用). + +对于Web应用程序, 它获取当前 `HttpContext` 的 `User` 属性,对于非Web应用程序它将返回 `Thread.CurrentPrincipal`. + +> 通常你不需要这种低级别的 `ICurrentPrincipalAccessor` 服务,直接使用上述的 `ICurrentUser` 即可. + +### 基本用法 + +你可以注入 `ICurrentPrincipalAccessor` 并且使用 `Principal` 属性获取当前principal: + +````csharp +public class MyService : ITransientDependency +{ + private readonly ICurrentPrincipalAccessor _currentPrincipalAccessor; + + public MyService(ICurrentPrincipalAccessor currentPrincipalAccessor) + { + _currentPrincipalAccessor = currentPrincipalAccessor; + } + + public void Foo() + { + var allClaims = _currentPrincipalAccessor.Principal.Claims.ToList(); + //... + } +} +```` + +### 更改当前Principle + +除了某些高级场景外,你不需要设置或更改当前principle. 如果需要可以使用 `ICurrentPrincipalAccessor` 的 `Change` 方法. 它接受一个 `ClaimsPrinciple` 对象并使其成为作用域的"当前"对象. + +示例: + +````csharp +public class MyAppService : ApplicationService +{ + private readonly ICurrentPrincipalAccessor _currentPrincipalAccessor; + + public MyAppService(ICurrentPrincipalAccessor currentPrincipalAccessor) + { + _currentPrincipalAccessor = currentPrincipalAccessor; + } + + public void Foo() + { + var newPrinciple = new ClaimsPrincipal( + new ClaimsIdentity( + new Claim[] + { + new Claim(AbpClaimTypes.UserId, Guid.NewGuid().ToString()), + new Claim(AbpClaimTypes.UserName, "john"), + new Claim("MyCustomCliam", "42") + } + ) + ); + + using (_currentPrincipalAccessor.Change(newPrinciple)) + { + var userName = CurrentUser.UserName; //returns "john" + //... + } + } +} +```` + +始终在 `using` 语句中使用 `Change` 方法,在 `using` 范围结束后它将恢复为原始值. + +这可以是一种模拟用户登录的应用程序代码范围的方法,但是请尝试谨慎使用它. + +## AbpClaimTypes + +`AbpClaimTypes` 是一个静态类它定义了标准声明的名称被ABP框架使用. + +* `UserName`, `UserId`, `Role` 和 `Email` 属性的默认值是通常[System.Security.Claims.ClaimTypes](https://docs.microsoft.com/en-us/dotnet/api/system.security.claims.claimtypes)类设置的, 但你可以改变它们. + +* 其他属性,如 `EmailVerified`, `PhoneNumber`, `TenantId` ...是由ABP框架通过尽可能遵循标准名称来定义的. + +建议使用这个类的属性来代替声明名称的魔术字符串. \ No newline at end of file diff --git a/docs/zh-Hans/Index.md b/docs/zh-Hans/Index.md index ce4fcfa3b4..3dd728c846 100644 --- a/docs/zh-Hans/Index.md +++ b/docs/zh-Hans/Index.md @@ -10,8 +10,8 @@ ABP是一个**开源应用程序框架**,专注于基于ASP.NET Core的Web应用 使用ABP开发新项目的最简单方法是使用启动模板: -* [ASP.NET Core MVC (Razor Pages) UI 启动模板](Getting-Started?UI=MVC&DB=EF&Tiered=No) -* [Angular UI 启动模板](Getting-Started?UI=NG&DB=EF&Tiered=No) +* [ASP.NET Core MVC (Razor Pages) UI 启动模板](Getting-Started.md?UI=MVC&DB=EF&Tiered=No) +* [Angular UI 启动模板](Getting-Started.md?UI=NG&DB=EF&Tiered=No) 如果你想从头开始(使用空项目),请手动安装ABP框架并使用以下教程: diff --git a/docs/zh-Hans/Startup-Templates/Console.md b/docs/zh-Hans/Startup-Templates/Console.md new file mode 100644 index 0000000000..caeb036d3d --- /dev/null +++ b/docs/zh-Hans/Startup-Templates/Console.md @@ -0,0 +1,19 @@ +# 控制台应用程序启动模板 + +此模板用于创建一个最小的依赖关系的ABP控制台应用程序项目. + +## 如何开始? + +首先,如果你没有安装[ABP CLI](../CLI.md),请先安装它: + +````bash +dotnet tool install -g Volo.Abp.Cli +```` + +在一个空文件夹使用 `abp new` 命令创建新解决方案: + +````bash +abp new Acme.MyConsoleApp -t console +```` + +`Acme.MyConsoleApp` 是解决方案的名称, 如*YourCompany.YourProduct*. 你可以使用单级或多级名称. \ No newline at end of file diff --git a/docs/zh-Hans/Startup-Templates/Index.md b/docs/zh-Hans/Startup-Templates/Index.md index 160a2b3e20..fbc91c7549 100644 --- a/docs/zh-Hans/Startup-Templates/Index.md +++ b/docs/zh-Hans/Startup-Templates/Index.md @@ -5,4 +5,5 @@ 单击下面列表中的名称以查看相关启动模板的文档: * [**app**](Application.md): 应用程序模板. -* [**module**](Module.md): 模块/服务模板. \ No newline at end of file +* [**module**](Module.md): 模块/服务模板. +* [**console**](Console.md): 控制台模板. \ No newline at end of file diff --git a/docs/zh-Hans/UI/Angular/Component-Replacement.md b/docs/zh-Hans/UI/Angular/Component-Replacement.md index 4465f34893..145359c348 100644 --- a/docs/zh-Hans/UI/Angular/Component-Replacement.md +++ b/docs/zh-Hans/UI/Angular/Component-Replacement.md @@ -543,6 +543,10 @@ export class AppComponent implements OnInit { ![New nav-items](./images/replaced-nav-items-component.png) +## 另请参阅 + +- [如何替换PermissionManagementComponent](./Permission-Management-Component-Replacement.md) + ## 下一步是什么? - [自定义设置页面](./Custom-Setting-Page.md) \ No newline at end of file diff --git a/docs/zh-Hans/UI/Angular/Permission-Management-Component-Replacement.md b/docs/zh-Hans/UI/Angular/Permission-Management-Component-Replacement.md new file mode 100644 index 0000000000..d39074a957 --- /dev/null +++ b/docs/zh-Hans/UI/Angular/Permission-Management-Component-Replacement.md @@ -0,0 +1 @@ +TODO.... \ No newline at end of file diff --git a/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Badges.md b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Badges.md new file mode 100644 index 0000000000..b15dd502b8 --- /dev/null +++ b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Badges.md @@ -0,0 +1,38 @@ +# 徽章 + +## 结合扫 + +`abp-badge` 和 `abp-badge-pill` 是abp徽章标签. + +基本用法: + +````csharp +Primary +Info +Danger +```` + +## Demo + +参阅[徽章demo页面](https://bootstrap-taghelpers.abp.io/Components/Badges)查看示例. + +### Values + +* 表示徽章的类型. 应为下列值之一: + + * `_` (默认值) + * `Default` (默认值) + * `Primary` + * `Secondary` + * `Success` + * `Danger` + * `Warning` + * `Info` + * `Light` + * `Dark` + +示例: + +````csharp +Danger +```` diff --git a/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Borders.md b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Borders.md new file mode 100644 index 0000000000..5b57ce76c3 --- /dev/null +++ b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Borders.md @@ -0,0 +1,124 @@ +# 边框 + +## 介绍 + +`abp-border` 是边框样式的主要元素. + +基本用法: + +````csharp + + + + + +```` + +## Demo + +参阅[边框demo页面](https://bootstrap-taghelpers.abp.io/Components/Borders)查看示例. + +## Values + +值代表类型,位置和边框的颜色.应为下列值之一: + +* `Default` +* `_0` +* `Primary` +* `Secondary` +* `Success` +* `Danger` +* `Warning` +* `Info` +* `Light` +* `Dark` +* `White` +* `Primary_0` +* `Secondary_0` +* `Success_0` +* `Danger_0` +* `Warning_0` +* `Info_0` +* `Light_0` +* `Dark_0` +* `White_0` +* `Top` +* `Top_0` +* `Top_Primary` +* `Top_Secondary` +* `Top_Success` +* `Top_Danger` +* `Top_Warning` +* `Top_Info` +* `Top_Light` +* `Top_Dark` +* `Top_White` +* `Top_Primary_0` +* `Top_Secondary_0` +* `Top_Success_0` +* `Top_Danger_0` +* `Top_Warning_0` +* `Top_Info_0` +* `Top_Light_0` +* `Top_Dark_0` +* `Top_White_0` +* `Right` +* `Right_0` +* `Right_Primary` +* `Right_Secondary` +* `Right_Success` +* `Right_Danger` +* `Right_Warning` +* `Right_Info` +* `Right_Light` +* `Right_Dark` +* `Right_White` +* `Right_Primary_0` +* `Right_Secondary_0` +* `Right_Success_0` +* `Right_Danger_0` +* `Right_Warning_0` +* `Right_Info_0` +* `Right_Light_0` +* `Right_Dark_0` +* `Right_White_0` +* `Left` +* `Left_0` +* `Left_Primary` +* `Left_Secondary` +* `Left_Success` +* `Left_Danger` +* `Left_Warning` +* `Left_Info` +* `Left_Light` +* `Left_Dark` +* `Left_White` +* `Left_Primary_0` +* `Left_Secondary_0` +* `Left_Success_0` +* `Left_Danger_0` +* `Left_Warning_0` +* `Left_Info_0` +* `Left_Light_0` +* `Left_Dark_0` +* `Left_White_0` +* `Bottom` +* `Bottom_0` +* `Bottom_Primary` +* `Bottom_Secondary` +* `Bottom_Success` +* `Bottom_Danger` +* `Bottom_Warning` +* `Bottom_Info` +* `Bottom_Light` +* `Bottom_Dark` +* `Bottom_White` +* `Bottom_Primary_0` +* `Bottom_Secondary_0` +* `Bottom_Success_0` +* `Bottom_Danger_0` +* `Bottom_Warning_0` +* `Bottom_Info_0` +* `Bottom_Light_0` +* `Bottom_Dark_0` +* `Bottom_White_0` diff --git a/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Breadcrumbs.md b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Breadcrumbs.md new file mode 100644 index 0000000000..10bc729fcb --- /dev/null +++ b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Breadcrumbs.md @@ -0,0 +1,25 @@ +# 面包屑 + +## Introduction + +`ABP-breadcrumb` 是面包屑项主容器. + +基本用法: + +````csharp + + + + + +```` + +## Demo + +参阅[面包屑demo页面](https://bootstrap-taghelpers.abp.io/Components/Breadcrumbs)查看示例. + +## abp-breadcrumb-item Attributes + +- **title**: 设置面包屑项文本. +- **active**: 设置活动面包屑项. 如果没有其他项是活动的,默认最后一项为活动项. +- **href**: 表示 `abp-breadcrumb-item` 是否有链接. 值应该是字符串链接. \ No newline at end of file diff --git a/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Navs.md b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Navs.md new file mode 100644 index 0000000000..6edbc1b96f --- /dev/null +++ b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Navs.md @@ -0,0 +1,114 @@ +# 导航 + +## 介绍 + +`abp-nav` 是从bootstrap nav元素派生的基本标签助手. + +基本用法: + +````csharp + + +Active + + +Longer nav link + + +link + + +disabled + + +```` + +## Demo + +参阅[导航demo页面](https://bootstrap-taghelpers.abp.io/Components/Navs)查看示例. + +## abp-nav Attributes + +- **nav-style**: 指示包含项的位置和样式. 应为以下值之一: + * `Default` (默认值) + * `Vertical` + * `Pill` + * `PillVertical` +- **align:** 指示包含项的对齐方式: + * `Default` (默认值) + * `Start` + * `Center` + * `End` + +### abp-nav-bar Attributes + +- **nav-style**: 指示基本导航栏的颜色布局. 应为以下值之一: + * `Default` (默认值) + * `Dark` + * `Light` + * `Dark_Primary` + * `Dark_Secondary` + * `Dark_Success` + * `Dark_Danger` + * `Dark_Warning` + * `Dark_Info` + * `Dark_Dark` + * `Dark_Link` + * `Light_Primary` + * `Light_Secondary` + * `Light_Success` + * `Light_Danger` + * `Light_Warning` + * `Light_Info` + * `Light_Dark` + * `Light_Link` +- **size:** 指示基本导航栏的大小. 应为以下值之一: + * `Default` (默认值) + * `Sm` + * `Md` + * `Lg` + * `Xl` + +### abp-nav-item Attributes + +**dropdown**: 将导航项设置为下拉菜单(如果提供的话). 可以是下列值之一: + +* `false` (默认值) +* `true` + +示例: + +````csharp + + Navbar + + + + Home (current) + + + Link + + + + + + Dropdown header + Action + Another disabled action + Something else here + + Separated link + + + + + Disabled + + + + Sample Text + + + +```` diff --git a/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Tables.md b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Tables.md new file mode 100644 index 0000000000..24c61d28fc --- /dev/null +++ b/docs/zh-Hans/UI/AspNetCore/Tag-Helpers/Tables.md @@ -0,0 +1,59 @@ +# 表格 + +## 介绍 + +`ABP-table` 在ABP中用于表格的基本标签组件. + +基本用法: + +````csharp + + + + # + First + Last + Handle + + + + + 1 + Mark + Otto + mdo + + + 2 + Jacob + Thornton + fat + + + 3 + Larry + the Bird + twitter + + + +```` + +## Demo + +参阅[表格demo页面](https://bootstrap-taghelpers.abp.io/Components/Tables)查看示例. + +## abp-table Attributes + +- **responsive**: 用于创建直至特定断点的响应表. 请参阅[特定断点](https://getbootstrap.com/docs/4.1/content/tables/#breakpoint-specific)获取更多信息. +- **responsive-sm**: 如果没有设置为false,则为小屏幕设备设置表响应性. +- **responsive-md**: 如果未设置为false,则为中等屏幕设备设置表响应性. +- **responsive-lg**: 如果未设置为false,则为大屏幕设备设置表响应性. +- **responsive-xl**: 如果未设置为false,则为超大屏幕设备设置表响应性. +- **dark-theme**: 如果设置为true,则将表格颜色主题设置为黑暗. +- **striped-rows**: 如果设置为true,则将斑马条纹添加到表行中. +- **hoverable-rows**: 如果设置为true,则将悬停状态添加到表行. +- **border-style**: 设置表格的边框样式. 应为以下值之一: + - `Default` (默认) + - `Bordered` + - `Borderless` diff --git a/docs/zh-Hans/docs-nav.json b/docs/zh-Hans/docs-nav.json index 23b17c1231..91e11119a9 100644 --- a/docs/zh-Hans/docs-nav.json +++ b/docs/zh-Hans/docs-nav.json @@ -181,6 +181,36 @@ "path": "Object-To-Object-Mapping.md" }, + { + "text": "BLOB存储", + "items": [ + { + "text": "BLOB存储系统", + "path": "Blob-Storing.md" + }, + { + "text": "存储提供者", + "items": [ + { + "text": "文件系统提供者", + "path": "Blob-Storing-File-System.md" + }, + { + "text": "数据库系统提供者", + "path": "Blob-Storing-Database.md" + }, + { + "text": "Azure提供者", + "path": "Blob-Storing-Azure.md" + }, + { + "text": "创建自定义提供者", + "path": "Blob-Storing-Custom-Provider.md" + } + ] + } + ] + }, { "text": "文本模板", "path": "Text-Templating.md"