mirror of https://github.com/abpframework/abp.git
committed by
GitHub
866 changed files with 11034 additions and 3245 deletions
@ -1,3 +1,220 @@ |
|||
# Angular UI: Theme Configurations |
|||
|
|||
> This document is in draft version. |
|||
Theme packages no longer import styles as CSS modules as of ABP version 6.0. The following style settings need to be included to the angular.json file in order for theme packages to load styles. |
|||
## Lepton X Lite |
|||
```json |
|||
{ |
|||
"input": "node_modules/@volo/ngx-lepton-x.lite/assets/css/bootstrap-dim.css", |
|||
"inject": false, |
|||
"bundleName": "bootstrap-dim" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/ngx-lepton-x.lite/assets/css/ng-bundle.css", |
|||
"inject": false, |
|||
"bundleName": "ng-bundle" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/ngx-lepton-x.lite/assets/css/side-menu/layout-bundle.css", |
|||
"inject": false, |
|||
"bundleName": "layout-bundle" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@abp/ng.theme.lepton-x/assets/css/abp-bundle.css", |
|||
"inject": false, |
|||
"bundleName": "abp-bundle" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/ngx-lepton-x.lite/assets/css/bootstrap-dim.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "bootstrap-dim.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/ngx-lepton-x.lite/assets/css/ng-bundle.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "ng-bundle.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/ngx-lepton-x.lite/assets/css/side-menu/layout-bundle.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "layout-bundle.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@abp/ng.theme.lepton-x/assets/css/abp-bundle.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "abp-bundle.rtl" |
|||
}, |
|||
``` |
|||
|
|||
## Theme Basic |
|||
```json |
|||
{ |
|||
"input": "node_modules/bootstrap/dist/css/bootstrap.rtl.min.css", |
|||
"inject": false, |
|||
"bundleName": "bootstrap-rtl.min" |
|||
}, |
|||
{ |
|||
"input": "node_modules/bootstrap/dist/css/bootstrap.min.css", |
|||
"inject": true, |
|||
"bundleName": "bootstrap-ltr.min" |
|||
}, |
|||
``` |
|||
|
|||
## Lepton X |
|||
```json |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/dark.css", |
|||
"inject": false, |
|||
"bundleName": "dark" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/light.css", |
|||
"inject": false, |
|||
"bundleName": "light" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/dim.css", |
|||
"inject": false, |
|||
"bundleName": "dim" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/bootstrap-dim.css", |
|||
"inject": false, |
|||
"bundleName": "bootstrap-dim" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/bootstrap-dark.css", |
|||
"inject": false, |
|||
"bundleName": "bootstrap-dark" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/bootstrap-light.css", |
|||
"inject": false, |
|||
"bundleName": "bootstrap-light" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/ng-bundle.css", |
|||
"inject": false, |
|||
"bundleName": "ng-bundle" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/side-menu/layout-bundle.css", |
|||
"inject": false, |
|||
"bundleName": "layout-bundle" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/abp.ng.theme.lepton-x/assets/css/abp-bundle.css", |
|||
"inject": false, |
|||
"bundleName": "abp-bundle" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/dark.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "dark.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/light.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "light.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/dim.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "dim.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/bootstrap-dim.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "bootstrap-dim.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/bootstrap-dark.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "bootstrap-dark.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/bootstrap-light.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "bootstrap-light.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/ng-bundle.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "ng-bundle.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/side-menu/layout-bundle.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "layout-bundle.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volosoft/abp.ng.theme.lepton-x/assets/css/abp-bundle.rtl.css", |
|||
"inject": false, |
|||
"bundleName": "abp-bundle.rtl" |
|||
} |
|||
``` |
|||
|
|||
## Theme Lepton |
|||
```json |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton1.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton1" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton2.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton2" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton3.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton3" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton4.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton4" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton5.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton5" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton6.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton6" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton1.rtl.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton1.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton2.rtl.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton2.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton3.rtl.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton3.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton4.rtl.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton4.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton5.rtl.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton5.rtl" |
|||
}, |
|||
{ |
|||
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton6.rtl.min.css", |
|||
"inject": false, |
|||
"bundleName": "lepton6.rtl" |
|||
}, |
|||
``` |
|||
|
|||
|
|||
|
|||
|
After Width: | Height: | Size: 794 KiB |
@ -0,0 +1,111 @@ |
|||
# 短信发送 |
|||
|
|||
ABP 框架提供一个用于发送短信的抽象, 有如下优点: |
|||
|
|||
- 在不改变应用程序代码的情况下, 你可以**非常容易地切换**短信发送提供者(提供商). |
|||
- 如果你想创建可重用的应用程序模块, 则不需要假设短信是如何发送的. |
|||
|
|||
## 安装 |
|||
|
|||
建议你使用[ABP CLI](CLI.md)来安装这个包. |
|||
|
|||
### 使用Abp CLI |
|||
|
|||
在项目所在目录(.csproj 文件所在目录)打开命令行工具, 输入如下命令: |
|||
|
|||
```bash |
|||
abp add-package Volo.Abp.Sms |
|||
``` |
|||
|
|||
### 手动安装 |
|||
|
|||
如果你想要手动安装; |
|||
|
|||
1. 添加 [Volo.Abp.Sms](https://www.nuget.org/packages/Volo.Abp.Sms) NuGet 包到你的项目中: |
|||
|
|||
``` |
|||
Install-Package Volo.Abp.Sms |
|||
``` |
|||
|
|||
2. 在你的模块的依赖列表中添加对模块`AbpSmsModule`的依赖: |
|||
|
|||
```csharp |
|||
[DependsOn( |
|||
//...其它依赖 |
|||
typeof(AbpSmsModule) //添加新模块的依赖 |
|||
)] |
|||
public class YourModule : AbpModule |
|||
{ |
|||
} |
|||
``` |
|||
|
|||
## 发送短信 |
|||
|
|||
[注入](Dependency-Injection.md) `ISmsSender`, 并使用`SendAsync`方法来发送短信. |
|||
|
|||
**例子:** |
|||
|
|||
```csharp |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Sms; |
|||
|
|||
namespace MyProject |
|||
{ |
|||
public class MyService : ITransientDependency |
|||
{ |
|||
private readonly ISmsSender _smsSender; |
|||
|
|||
public MyService(ISmsSender smsSender) |
|||
{ |
|||
_smsSender = smsSender; |
|||
} |
|||
|
|||
public async Task DoItAsync() |
|||
{ |
|||
await _smsSender.SendAsync( |
|||
"+012345678901", // 目标手机号 |
|||
"This is test sms..." // 消息内容 |
|||
); |
|||
} |
|||
} |
|||
} |
|||
``` |
|||
|
|||
示例中给定的`SendAsync`方法是一个扩展方法, 用于发送带有基本参数的短信.此外, 你也可以传入一个有如下属性的`SmsMessage`对象: |
|||
|
|||
- `PhoneNumber` (`string`):目标手机号 |
|||
- `Text` (`string`):短信消息内容 |
|||
- `Properties` (`Dictionary<string, string>`):用于传入自定义参数的键值对 |
|||
|
|||
## NullSmsSender |
|||
|
|||
`NullSmsSender`是`ISmsSender`的一个默认实现.它写入内容到[日志](Logging.md)中, 而不是真正地发送短信. |
|||
|
|||
开发时, 你不想真正地发送短信时, 这个类是非常有用的.**然而, 若你想真实发送短信, 你需要在你的应用程序代码中实现`ISmsSender`接口.** |
|||
|
|||
## 实现ISmsSender接口 |
|||
|
|||
通过创建一个实现`ISmsSender`接口的类, 你可以很容易创建你自己的短信发送实现, 如下所示: |
|||
|
|||
```csharp |
|||
using System.IO; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Sms; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace AbpDemo |
|||
{ |
|||
public class MyCustomSmsSender : ISmsSender, ITransientDependency |
|||
{ |
|||
public async Task SendAsync(SmsMessage smsMessage) |
|||
{ |
|||
// 发送短信 |
|||
} |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## More |
|||
|
|||
[ABP Commercial](https://commercial.abp.io/)提供Twilio的集成包, 用于使用[Twilio service](https://docs.abp.io/en/commercial/latest/modules/twilio-sms)来发送短信. |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue