Browse Source

Add virtual file explorer module documentation.

pull/4090/head
liangshiwei 6 years ago
parent
commit
da30990140
  1. 1
      docs/en/Modules/Index.md
  2. 80
      docs/en/Modules/Virtual-File-Explorer.md
  3. BIN
      docs/en/images/virtual-file-explorer.png
  4. 1
      docs/zh-Hans/Modules/Index.md
  5. 80
      docs/zh-Hans/Modules/Virtual-File-Explorer.md
  6. BIN
      docs/zh-Hans/images/virtual-file-explorer.png

1
docs/en/Modules/Index.md

@ -23,6 +23,7 @@ There are some **free and open source** application modules developed and mainta
* **[Setting Management](Setting-Management.md)**: Used to persist and manage the [settings](../Settings.md).
* **Tenant Management**: Manages tenants for a [multi-tenant](../Multi-Tenancy.md) application.
* **Users**: Abstract users, so other modules can depend on this module instead of the Identity module.
* [**Virtual File Explorer**](Virtual-File-Explorer.md): Provided a simple UI to view files in [virtual file system](../Virtual-File-System.md).
See [the GitHub repository](https://github.com/abpframework/abp/tree/master/modules) for source code of all modules.

80
docs/en/Modules/Virtual-File-Explorer.md

@ -0,0 +1,80 @@
# Virtual File Explorer Module
## What is Virtual File Explorer Module?
Virtual File Explorer Module provided a simple UI to view all files in [virtual file system](../Virtual-File-System.md).
> Virtual File Explorer Module is not installed for [the startup templates](../Startup-Templates/Index.md). So, you need to manually add this module to your application.
### Installation
#### 1- Referencing Virtual File Explorer Module Packages
It is recommended to use the ABP CLI to install the module, open the CMD window in the solution file (`.sln`) directory, and run the following command:
`abp add-module Volo.VirtualFileExplorer`
Or you can also manually install nuget package to `Acme.MyProject.Web` project:
* Install [Volo.Abp.VirtualFileExplorer.Web](https://www.nuget.org/packages/Volo.Abp.VirtualFileExplorer.Web/) nuget package to `Acme.MyProject.Web` project.
`Install-Package Volo.Abp.VirtualFileExplorer.Web`
#### 2- Adding Module Dependencies
* Open `MyProjectWebModule.cs`and add `typeof(AbpVirtualFileExplorerWebModule)` as shown below;
```csharp
[DependsOn(
typeof(AbpVirtualFileExplorerWebModule),
typeof(MyProjectApplicationModule),
typeof(MyProjectEntityFrameworkCoreModule),
typeof(AbpAutofacModule),
typeof(AbpIdentityWebModule),
typeof(AbpAccountWebModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule)
)]
public class MyProjectWebModule : AbpModule
{
//...
}
```
#### 3- Adding NPM Package
* Open `package.json` and add `@abp/virtual-file-explorer": "^2.9.0` as shown below:
```json
{
"version": "1.0.0",
"name": "my-app",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^2.9.0",
"@abp/virtual-file-explorer": "^2.9.0"
}
}
```
Then open the command line terminal in the `Acme.MyProject.Web` project folder and run the following command:
1. `yarn`
2. `gulp`
That's all,Now run the application and Navigate to `/VirtualFileExplorer`. You will see virtual file explorer page:
![Virtual-File-Explorer](../images/virtual-file-explorer.png)
### Options
You can disabled virtual file explorer module via `AbpVirtualFileExplorerOptions` options:
```csharp
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpVirtualFileExplorerOptions>(options =>
{
options.IsEnabled = false;
});
}
```

BIN
docs/en/images/virtual-file-explorer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

1
docs/zh-Hans/Modules/Index.md

@ -23,6 +23,7 @@ ABP是一个 **模块化的应用程序框架** 由十多个 **nuget packages**
* **Setting Management**: 用于保存设置.
* **Tenant Management**: 管理[多租户](../Multi-Tenancy.md)应用程序的租户.
* **Users**: 抽象用户, 因此其他模块可以依赖此模块而不是Identity模块.
* [**Virtual File Explorer**](Virtual-File-Explorer.md): 提供简单的UI查看[虚拟文件系统](../Virtual-File-System.md)中的文件.
模块化文档正在编写中. 请参阅[这个仓库](https://github.com/abpframework/abp/tree/master/modules)获取所有模块的源代码.

80
docs/zh-Hans/Modules/Virtual-File-Explorer.md

@ -0,0 +1,80 @@
# 虚拟文件浏览器模块
## 什么是虚拟文件浏览器模块
虚拟文件浏览器模块提供了一个简单的UI来查看[虚拟文件系统](../Virtual-File-System.md)所有的文件.
> [启动模板](../Startup-Templates/Index.md)默认并没有安装这个模块,所以你需要手动安装到应用程序.
### 安装
#### 1- 引用虚拟文件浏览器模块包
建议使用ABP CLI安装模块,在解决方案文件 (`.sln`) 目录打开 `CMD` 窗口,运行以下命令:
`abp add-module Volo.VirtualFileExplorer`
或者你也可以手动安装nuget包到 `Acme.MyProject.Web` 项目:
* 安装[Volo.Abp.VirtualFileExplorer.Web](https://www.nuget.org/packages/Volo.Abp.VirtualFileExplorer.Web/) nuget包到 `Acme.MyProject.Web` 项目.
`Install-Package Volo.Abp.VirtualFileExplorer.Web`
#### 2- 添加模块依赖
* 打开 `MyProjectWebModule.cs` 并且添加 `typeof(AbpVirtualFileExplorerWebModule)` 如下所示;
```csharp
[DependsOn(
typeof(AbpVirtualFileExplorerWebModule),
typeof(MyProjectApplicationModule),
typeof(MyProjectEntityFrameworkCoreModule),
typeof(AbpAutofacModule),
typeof(AbpIdentityWebModule),
typeof(AbpAccountWebModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule)
)]
public class MyProjectWebModule : AbpModule
{
//...
}
```
#### 3- 添加NPM包
* 打开 `package.json` 添加 `@abp/virtual-file-explorer": "^2.9.0` 如下所示:
```json
{
"version": "1.0.0",
"name": "my-app",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^2.9.0",
"@abp/virtual-file-explorer": "^2.9.0"
}
}
```
然后在 `Acme.MyProject.Web` 项目目录打开命令行终端运行以下命令:
1. `yarn`
2. `gulp`
这就是全部,运行应用程序导航到 `/VirtualFileExplorer`. 你会看到虚拟文件浏览器页面:
![Virtual-File-Explorer](../images/virtual-file-explorer.png)
### 选项
你可以通过 `AbpVirtualFileExplorerOptions` 选项禁用虚拟文件浏览器模块:
```csharp
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpVirtualFileExplorerOptions>(options =>
{
options.IsEnabled = false;
});
}
```

BIN
docs/zh-Hans/images/virtual-file-explorer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Loading…
Cancel
Save