Browse Source

docs: update README

pull/431/head
cKey 4 years ago
parent
commit
ff11c5387f
  1. 318
      README.en.md
  2. 275
      README.md

318
README.en.md

@ -1,126 +1,90 @@
English | [简体中文](./README.md) English | [简体中文](./README.md)
[RELEASE](./RELEASE.md) RELEASE
## Overview ## Overview
This is a [vue-typescript-admin-template](http://armour.github.io/vue-typescript-admin-template) -based Abp framework background management interface This is a [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) -based Abp framework background management interface
## Documentation ## Quick Start
[Docs](https://armour.github.io/vue-typescript-admin-docs) ### 1、Install cli
## Screenshots ```shell
dotnet tool install --global LINGYUN.Abp.Cli --version 4.4.0
```
![Logging](./vueJs/images/logging.png) ### 2、Install .NET Template
![AuditLog](./vueJs/images/audit-log.png) ```shell
dotnet new --install LINGYUN.Abp.MicroService.Templates::4.4.0
```
![SecurityLog](./vueJs/images/security-log.png) ### 3、Use cli create new project
![ApiGateway](./vueJs/images/apigateway.png) ```shell
# use sqlserver
# MyCompanyName you company name
# MyProjectName you project name
# MyPackageName you package name
# -o See: abp cli
# --dbms See: abp cli
# --cs See: abp cli
# --no-random-port See: abp cli
labp create MyCompanyName.MyProjectName -pk MyPackageName -o "D:\Project" --dbms sqlserver --cs "Server=127.0.0.1;Database=MyProject;User Id=sa;Password=123456" --no-random-port
cd D:\Project\host\MyPackageName.MyCompanyName.MyProjectName.HttpApi.Host
![Data Dictionary](./vueJs/images/data-dictionary.png) dotnet restore
![Oss Management](./vueJs/images/oss.png) dotnet run
![Features](./vueJs/images/features.png) start http://127.0.0.1:5000/
![Settings](./vueJs/images/settings.png) ```
## Screenshots
![Menus](./vueJs/images/menus.png) ![Logging](./apps/vue/images/logging.png)
![OrganizationUnits](./vueJs/images/organization-unit.png) ![Audit Log](./apps/vue/images/audit-log.png)
![Localization](./vueJs/images/localization.png) ![Security Log](./apps/vue/images/security-log.png)
![Data Dictionary](./apps/vue/images/data-dictionary.png)
![Oss Management](./apps/vue/images/oss.png)
![Feature Management](./apps/vue/images/features.png)
![Settings](./apps/vue/images/settings.png)
![Dynamic Manus](./apps/vue/images/menus.png)
![Organization Unit](./apps/vue/images/organization-unit.png)
![Localization Management](./apps/vue/images/localization.png)
## Related Projects ## Related Projects
[Armour/vue-typescript-admin-mock-server](https://github.com/armour/vue-typescript-admin-mock-server) (mock server for this project) [abpframework/abp](https://github.com/abpframework/abp) (abp vNext)
[Armour/vue-typescript-admin-docs](https://github.com/armour/vue-typescript-admin-docs) (documentation source for this project) [EasyAbp/Cap](https://github.com/EasyAbp/Abp.EventBus.CAP) (EasyAbp)
Javascript version: Javascript version:
[PanJiaChen/vue-admin-template](https://github.com/PanJiaChen/vue-admin-template) (a vue2.0 minimal admin template) [vue-vben-admin](https://github.com/anncwb/vue-vben-admin.git) (vue-vben-admin)
[PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) (full features supported vue admin)
[PanJiaChen/electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) (a vue electron admin project)
## Features
```txt
- Login / Logout
- Permission Authentication
- Page permission
- Directive permission
- Permission configuration page
- Two-step login
- Multi-environment build
- Dev / Stage / Prod
- Global Features
- I18n
- Dynamic themes
- Dynamic sidebar (supports multi-level routing)
- Dynamic breadcrumb
- Tags-view (supports right-click operation)
- Clipboard
- Svg icons
- Search
- Screenfull
- Settings
- Mock data / Mock server
- PWA support
- Components
- Editors
- Rich Text Editor
- Markdown Editor
- JSON Editor
- Avatar Upload
- Back To Top
- CountTo
- Dropzone
- Draggable Dialog
- Draggable Kanban
- Draggable List
- Draggable Select
- ECharts
- Mixin
- SplitPane
- Sticky
- Table
- Dynamic Table
- Draggable Table
- Inline Edit Table
- Complex Table
- Excel
- Export Excel
- Upload Excel
- Excel Visualization
- Zip
- Export zip
- PDF
- Download pdf
- Dashboard
- Guide Page
- Advanced Example Page
- Error Log
- Error Page
- 401
- 404
```
## Preparation ## Preparation
You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [typescript](https://www.typescriptlang.org/), [vue](https://vuejs.org/index.html), [vuex](https://vuex.vuejs.org/), [vue-router](https://router.vuejs.org/), [vue-cli](https://github.com/vuejs/vue-cli) , [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), Understanding and learning these knowledge in advance will greatly help you on using this project. - [node](http://nodejs.org/) and [git](https://git-scm.com/) - Project development environment
- [Vite](https://vitejs.dev/) - Familiar with vite features
- [Vue3](https://v3.vuejs.org/) - Familiar with Vue basic syntax
- [TypeScript](https://www.typescriptlang.org/) - Familiar with the basic syntax of `TypeScript`
- [Es6+](http://es6.ruanyifeng.com/) - Familiar with es6 basic syntax
- [Vue-Router-Next](https://next.router.vuejs.org/) - Familiar with the basic use of vue-router
- [Ant-Design-Vue](https://2x.antdv.com/docs/vue/introduce-cn/) - ui basic use
- [Mock.js](https://github.com/nuysoft/Mock) - mockjs basic syntax
## Project Structure ## Project Structure
@ -135,34 +99,26 @@ You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) l
│ ├── assets # module assets like fonts, images (processed by webpack) │ ├── assets # module assets like fonts, images (processed by webpack)
│ ├── components # global components │ ├── components # global components
│ ├── directives # global directives │ ├── directives # global directives
│ ├── filters # global filter │   ├── enums # global enums
│ ├── icons # svg icons │   ├── hooks # global hooks
│ ├── lang # i18n language │   ├── locales # locales
│ ├── layout # global layout │   ├── layout # layouts
│ ├── pwa # PWA service worker related files
│ ├── router # router │ ├── router # router
│   ├── settings # global settings
│ ├── store # store │ ├── store # store
│ ├── styles # global css
│ ├── utils # global utils │ ├── utils # global utils
│ ├── views # views │ ├── views # views
│ ├── App.vue # main app component │ ├── App.vue # main app component
│ ├── main.ts # app entry file │ ├── main.ts # app entry file
│ ├── permission.ts # permission authentication ├── types # types
│ ├── settings.ts # setting file
│ └── shims.d.ts # type definition shims
├── tests/ # tests ├── tests/ # tests
├── .circleci/ # automated CI configuration
├── .browserslistrc # browserslist config file (to support Autoprefixer)
├── .editorconfig # editor code format consistency config
├── .env.xxx # env variable configuration ├── .env.xxx # env variable configuration
├── .eslintrc.js # eslint config ├── .eslintrc.js # eslint config
├── babel.config.js # babel config
├── cypress.json # e2e test config
├── jest.config.js # jest unit test config ├── jest.config.js # jest unit test config
├── package.json # package.json ├── package.json # package.json
├── postcss.config.js # postcss config ├── postcss.config.js # postcss config
├── tsconfig.json # typescript config ├── tsconfig.json # typescript config
└── vue.config.js # vue-cli config └── vite.config.js # vue vite config
``` ```
## Project setup ## Project setup
@ -182,71 +138,21 @@ yarn install
Modify the server address that the development environment will use for the proxy. Provide the following three addresses: IdentityService, IdentityServer, and ApiService Modify the server address that the development environment will use for the proxy. Provide the following three addresses: IdentityService, IdentityServer, and ApiService
```bash ```bash
VITE_PROXY = [["/connect","http://127.0.0.1:44385"],["/api","http://127.0.0.1:30000"],["/signalr-hubs","ws://127.0.0.1:30000"]]
proxy: {
// change xxx-api/login => /mock-api/v1/login
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_IDENTITY_SERVER]: {
// IdentityServer4 Server address, used for authentication
target: 'http://localhost:44385',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_IDENTITY_SERVER]: ''
}
},
[process.env.VUE_APP_SIGNALR_SERVER]: {
// SignalR address for the messaging service, SignalR USES WebSocket communication, so a separate proxy address is required
target: 'ws://localhost:30000',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_SIGNALR_SERVER]: ''
},
logLevel: 'debug'
},
[process.env.VUE_APP_BASE_API]: {
// All other business is through the gateway proxy, directly fill in the gateway address
target: 'http://localhost:30000',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
},
logLevel: 'debug'
}
}
``` ```
Modify the actual address of the production environment, as above Modify the actual address of the production environment, as above
```bash ```bash
# STS Connect
# Base api # token issue
# Remeber to change this to your production server address VITE_GLOB_AUTHORITY='http://127.0.0.1:44385'
# Here I used my mock server for this project
# VUE_APP_BASE_API = 'https://vue-typescript-admin-mock-server.armour.now.sh/mock-api/v1/'
# Business services
VUE_APP_BASE_API = '/api'
# SignalR
VUE_APP_SIGNALR_SERVER = '/signalr-hubs'
# IdentityServer4
VUE_APP_BASE_IDENTITY_SERVER = '/connect'
# default tenant name
VUE_APP_TENANT_NAME = ''
# client id # client id
VUE_APP_CLIENT_ID = 'vue-admin-element' VITE_GLOB_CLIENT_ID='vue-admin-element'
# client secret # client secret
VUE_APP_CLIENT_SECRET = '1q2w3e*' VITE_GLOB_CLIENT_SECRET='1q2w3e*'
``` ```
### Initializes appsettings.json
In directory **./aspnet-core/configuration** ,Copy the given settings file to your own project directory (only if you are cloning the repository for the first time)
Make sure the configuration file is the same as the connection configuration of your development environment middleware, such as RabbitMQ, MySql, Redis, and so on
### EntityFramework migration ### EntityFramework migration
Please switch to the service project startup directory and execute the **dotnet EF ** command for database migration Please switch to the service project startup directory and execute the **dotnet EF ** command for database migration
@ -263,14 +169,6 @@ dotnet ef database update
- You can also use quick migration script files: **./build/build-aspnetcore-ef-update.ps1** - You can also use quick migration script files: **./build/build-aspnetcore-ef-update.ps1**
### Initializes the apigateway database
In the **2020-08-05 16:25:00** submission, the **apigateway-init.SQL** file has been read and written to the **DataSeeder** type. Starting the gateway management project will automatically initialize the gateway data.
Make sure the **aspnet-core/Database/apigateway-init.sql** file exists
### Configure the RabbitMQ ### Configure the RabbitMQ
Therefore project design for the micro service architecture, with the method of distributed event, communication between project USES is [DotNetCore/CAP](https://github.com/dotnetcore/CAP) Therefore project design for the micro service architecture, with the method of distributed event, communication between project USES is [DotNetCore/CAP](https://github.com/dotnetcore/CAP)
@ -295,23 +193,23 @@ start-all-service.bat
```shell ```shell
cd vueJs cd apps/vue
start-vue-admin.bat yarn dev
``` ```
#### Compiles and minifies for production #### Compiles and minifies for production
```bash ```bash
yarn run build:prod yarn run build
``` ```
### About Docker container ### About Docker container
**Step 1**: Building background services, powershell script: **./build/build-aspnetcore-release.ps1**, **Warning: after the release of service need configuration file: appsettings.Production.json** **Step 1**: Building background services, powershell script: **./build/build-aspnetcore-release.ps1**, **Warning: after the release of service need configuration file: appsettings.Production.json**
**Step 2**: Build the front-end, **./build/build-vue-element-admin.ps1** **Step 2**: Build the front-end, **./build/build-vue-apps.ps1**
**Step 3**: Build after the release of the address of the default in **./aspnet-core/services/Publish**, change nginx proxy server address: **./client/docker/nginx/default.conf** **Step 3**: Build after the release of the address of the default in **./aspnet-core/services/Publish**, change nginx proxy server address: **./client/docker/nginx/default.conf**
@ -322,7 +220,7 @@ yarn run build:prod
#### Lints and fixes files #### Lints and fixes files
```bash ```bash
yarn run lint yarn lint:eslint
``` ```
#### Run your unit tests #### Run your unit tests
@ -331,34 +229,60 @@ yarn run lint
yarn run test:unit yarn run test:unit
``` ```
#### Run your end-to-end tests
```bash ## How to contribute
yarn run test:e2e
```
#### Generate all svg components You are very welcome to join!Raise an issue Or submit a Pull Request。
```bash **Pull Request:**
yarn run svg
``` 1. Fork code!
2. Create your own branch: `git checkout -b feat/xxxx`
3. Submit your changes: `git commit -am 'feat(function): add xxxxx'`
4. Push your branch: `git push origin feat/xxxx`
5. submit`pull request`
## Git Contribution submission specification
- reference [vue](./apps/vue/.github/COMMIT_CONVENTION.md) specification ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
- `feat` Add new features
- `fix` Fix the problem/BUG
- `style` The code style is related and does not affect the running result
- `perf` Optimization/performance improvement
- `refactor` Refactor
- `revert` Undo edit
- `test` Test related
- `docs` Documentation/notes
- `chore` Dependency update/scaffolding configuration modification etc.
- `workflow` Workflow improvements
- `ci` Continuous integration
- `types` Type definition file changes
- `wip` In development
## Related warehouse
#### Customize Vue configuration If these plugins are helpful to you, you can give a star support
See [Configuration Reference](https://cli.vuejs.org/config/). - [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - Used for local and development environment data mock
- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - Used for html template conversion and compression
- [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - Used for component library style introduction on demand
- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - Used for online switching of theme colors and other color-related configurations
- [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) - Used to pack compressed image resources
- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - Used to pack input .gz|.brotil files
- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - Used to quickly generate svg sprite
## Browsers support ## Browser support
Modern browsers and Internet Explorer 10+. The `Chrome 80+` browser is recommended for local development
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | Support modern browsers, not IE
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
## Contributing | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| :-: | :-: | :-: | :-: | :-: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
See [CONTRIBUTING.md](https://github.com/Armour/vue-typescript-admin-template/blob/master/.github/CONTRIBUTING.md)
## License ## License
[MIT License](https://github.com/Armour/vue-typescript-admin-template/blob/master/LICENSE) [MIT License](./LICENSE)

275
README.md

@ -5,7 +5,7 @@
## 总览 ## 总览
这是一个基于 [vue-typescript-admin-template](http://armour.github.io/vue-typescript-admin-template) 的Abp框架后台管理界面 这是一个基于 [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) 的Abp框架后台管理界面
## 快速搭建微服务启动项目 ## 快速搭建微服务启动项目
@ -45,33 +45,27 @@
``` ```
## 前端文档
[文档](https://armour.github.io/vue-typescript-admin-docs/zh)
## 截图 ## 截图
![系统日志](./vueJs/images/logging.png) ![系统日志](./apps/vue/images/logging.png)
![审计日志](./vueJs/images/audit-log.png)
![安全日志](./vueJs/images/security-log.png) ![审计日志](./apps/vue/images/audit-log.png)
![网关管理](./vueJs/images/apigateway.png) ![安全日志](./apps/vue/images/security-log.png)
![数据字典](./vueJs/images/data-dictionary.png) ![数据字典](./apps/vue/images/data-dictionary.png)
![对象存储](./vueJs/images/oss.png) ![对象存储](./apps/vue/images/oss.png)
![特性管理](./vueJs/images/features.png) ![特性管理](./apps/vue/images/features.png)
![系统设置](./vueJs/images/settings.png) ![系统设置](./apps/vue/images/settings.png)
![菜单管理](./vueJs/images/menus.png) ![菜单管理](./apps/vue/images/menus.png)
![组织机构](./vueJs/images/organization-unit.png) ![组织机构](./apps/vue/images/organization-unit.png)
![本地化管理](./vueJs/images/localization.png) ![本地化管理](./apps/vue/images/localization.png)
## 相关项目 ## 相关项目
@ -81,95 +75,20 @@
[EasyAbp/Cap](https://github.com/EasyAbp/Abp.EventBus.CAP) (EasyAbp) [EasyAbp/Cap](https://github.com/EasyAbp/Abp.EventBus.CAP) (EasyAbp)
Typescript 版本: 前端项目
[Armour/vue-typescript-admin-mock-server](https://github.com/armour/vue-typescript-admin-mock-server) (mock server for this project) [vue-vben-admin](https://github.com/anncwb/vue-vben-admin.git) (vue-vben-admin)
[Armour/vue-typescript-admin-docs](https://github.com/armour/vue-typescript-admin-docs) (documentation source for this project)
Javascript 版本:
[PanJiaChen/vue-admin-template](https://github.com/PanJiaChen/vue-admin-template) (a vue2.0 minimal admin template)
[PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) (full features supported vue admin)
[PanJiaChen/electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) (a vue electron admin project)
## 功能
```txt
- 登录 / 注销
- 权限验证
- 页面权限
- 指令权限
- 权限配置
- 二步登录
- 多环境发布
- Dev / Stage / Prod
- 全局功能
- 国际化多语言
- 动态换肤
- 动态侧边栏(支持多级路由嵌套)
- 动态面包屑
- 快捷导航(支持右键操作)
- 粘贴板
- Svg 图标
- 搜索
- 全屏
- 设置
- Mock 数据 / Mock 服务器
- 支持 PWA
- 组件
- 编辑器
- 富文本编辑器
- Markdown 编辑器
- JSON 编辑器
- 头像上传
- 返回顶部
- CountTo
- 拖放区
- 拖拽弹窗
- 拖拽看板
- 拖拽列表
- 拖拽选择
- ECharts 图表
- Mixin
- 拆分窗格
- 黏性组件
- 表格
- 动态表格
- 拖拽表格
- 内联编辑表格
- 复杂表格
- Excel
- 导出excel
- 导入excel
- 前端可视化excel
- Zip
- 导出zip
- PDF
- 下载 pdf
- 控制台
- 引导页
- 综合实例
- 错误日志
- 错误页面
- 401
- 404
```
## 前序准备 ## 准备
你需要在本地安装 [node](http://nodejs.org/) 和 [git](https://git-scm.com/)。本项目技术栈基于 [typescript](https://www.typescriptlang.org/)、[vue](https://cn.vuejs.org/index.html)、[vuex](https://vuex.vuejs.org/zh-cn/)、[vue-router](https://router.vuejs.org/zh-cn/) 、[vue-cli](https://github.com/vuejs/vue-cli) 、[axios](https://github.com/axios/axios) 和 [element-ui](https://github.com/ElemeFE/element),提前了解和学习这些知识会对使用本项目有很大的帮助。 - [node](http://nodejs.org/) 和 [git](https://git-scm.com/) -项目开发环境
- [Vite](https://vitejs.dev/) - 熟悉 vite 特性
- [Vue3](https://v3.vuejs.org/) - 熟悉 Vue 基础语法
- [TypeScript](https://www.typescriptlang.org/) - 熟悉`TypeScript`基本语法
- [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法
- [Vue-Router-Next](https://next.router.vuejs.org/) - 熟悉 vue-router 基本使用
- [Ant-Design-Vue](https://2x.antdv.com/docs/vue/introduce-cn/) - ui 基本使用
- [Mock.js](https://github.com/nuysoft/Mock) - mockjs 基本语法
## 目录结构 ## 目录结构
@ -186,34 +105,26 @@ Javascript 版本:
│   ├── assets # 主题 字体等静态资源 (由 webpack 处理加载) │   ├── assets # 主题 字体等静态资源 (由 webpack 处理加载)
│   ├── components # 全局组件 │   ├── components # 全局组件
│   ├── directive # 全局指令 │   ├── directive # 全局指令
│   ├── filters # 全局过滤函数 │   ├── enums # 全局枚举
│   ├── icons # svg 图标 │   ├── hooks # 全局hooks
│   ├── lang # 国际化 │   ├── locales # 国际化
│   ├── layout # 全局布局 │   ├── layout # 全局布局
│ ├── pwa # PWA service worker 相关的文件
│   ├── router # 路由 │   ├── router # 路由
│   ├── settings # 全局 配置
│   ├── store # 全局 vuex store │   ├── store # 全局 vuex store
│   ├── styles # 全局样式
│   ├── utils # 全局方法 │   ├── utils # 全局方法
│   ├── views # 所有页面 │   ├── views # 所有页面
│   ├── App.vue # 入口页面 │   ├── App.vue # 入口页面
│   ├── main.js # 入口文件 加载组件 初始化等 │   └── main.js # 入口文件 加载组件 初始化等
│ ├── permission.ts # 权限管理 ├── types # ts类型
│ ├── settings.ts # 设置文件
│ └── shims.d.ts # 模块注入
├── tests # 测试 ├── tests # 测试
├── .circleci/ # 自动化 CI 配置
├── .browserslistrc # browserslistrc 配置文件 (用于支持 Autoprefixer)
├── .editorconfig # 编辑相关配置
├── .env.xxx # 环境变量配置 ├── .env.xxx # 环境变量配置
├── .eslintrc.js # eslint 配置 ├── .eslintrc.js # eslint 配置
├── babel.config.js # babel-loader 配置
├── cypress.json # e2e 测试配置
├── jest.config.js # jest 单元测试配置 ├── jest.config.js # jest 单元测试配置
├── package.json # package.json 依赖 ├── package.json # package.json 依赖
├── postcss.config.js # postcss 配置 ├── postcss.config.js # postcss 配置
├── tsconfig.json # typescript 配置 ├── tsconfig.json # typescript 配置
└── vue.config.js # vue-cli 配置 └── vite.config.js # vue vite 配置
``` ```
## 如何设置以及启动项目 ## 如何设置以及启动项目
@ -232,36 +143,7 @@ yarn install
```bash ```bash
proxy: { VITE_PROXY = [["/connect","http://127.0.0.1:44385"],["/api","http://127.0.0.1:30000"],["/signalr-hubs","ws://127.0.0.1:30000"]]
// change xxx-api/login => /mock-api/v1/login
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_IDENTITY_SERVER]: {
// IdentityServer4服务器地址,用于身份认证
target: 'http://localhost:44385',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_IDENTITY_SERVER]: ''
}
},
[process.env.VUE_APP_SIGNALR_SERVER]: {
// 消息服务SignalR地址,SignalR使用WebSocket通讯,因此需要单独一个代理地址
target: 'ws://localhost:30000',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_SIGNALR_SERVER]: ''
},
logLevel: 'debug'
},
[process.env.VUE_APP_BASE_API]: {
// 其他所有业务都是通过网关代理,直接填写网关地址即可
target: 'http://localhost:30000',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
},
logLevel: 'debug'
}
}
``` ```
@ -269,32 +151,16 @@ yarn install
```bash ```bash
# Base api # STS Connect
# Remeber to change this to your production server address # token签发地址
# Here I used my mock server for this project VITE_GLOB_AUTHORITY='http://127.0.0.1:44385'
# VUE_APP_BASE_API = 'https://vue-typescript-admin-mock-server.armour.now.sh/mock-api/v1/'
# 所有第一级请求路径为 /api 的为业务服务
VUE_APP_BASE_API = '/api'
# 所有第一级请求路径为 /signalr-hubs 的请求为SignalR请求
VUE_APP_SIGNALR_SERVER = '/signalr-hubs'
# 所有第一级请求路径为 /connect 的为 IdentityServer4 的请求
VUE_APP_BASE_IDENTITY_SERVER = '/connect'
# 默认的租户名称
VUE_APP_TENANT_NAME = ''
# 客户端标识 # 客户端标识
VUE_APP_CLIENT_ID = 'vue-admin-element' VITE_GLOB_CLIENT_ID='vue-admin-element'
# 客户端密钥 # 客户端密钥
VUE_APP_CLIENT_SECRET = '1q2w3e*' VITE_GLOB_CLIENT_SECRET='1q2w3e*'
```
### 初始化 appsettings.json
当前所有启动项目配置存储在 **./aspnet-core/configuration** 目录,请按照给定的项目名称复制到自己的项目目录(仅在您第一次克隆此仓库是这样做)
确保配置文件与您的开发环境中间件的连接配置相同,例如RabbitMQ、MySql、Redis等 ```
### EntityFramework 迁移 ### EntityFramework 迁移
@ -312,11 +178,6 @@ dotnet ef database update
- 也可以使用快速迁移脚本文件: **./build/build-aspnetcore-ef-update.ps1** - 也可以使用快速迁移脚本文件: **./build/build-aspnetcore-ef-update.ps1**
### 初始化网关数据库
**2020-08-05 16:25:00** 的提交中, 已经将**apigateway-init.sql**文件内容读取并写入**DataSeeder**类型, 启动网关管理项目会自动初始化网关数据,
请确保**aspnet-core/database/apigateway-init.sql**文件存在
### 配置RabbitMQ ### 配置RabbitMQ
因此项目设计为微服务架构,服务间通讯采用分布式事件的方式,项目采用的是[DotNetCore/CAP](https://github.com/dotnetcore/CAP) 因此项目设计为微服务架构,服务间通讯采用分布式事件的方式,项目采用的是[DotNetCore/CAP](https://github.com/dotnetcore/CAP)
@ -334,27 +195,27 @@ start-all-service.bat
``` ```
### 启动本地开发环境(自带热启动) ### 启动本地开发环境
```shell ```shell
cd vueJs cd apps/vue
start-vue-admin.bat yarn dev
``` ```
### 构建生产环境 (自带压缩) ### 构建生产环境
```bash ```bash
yarn build:prod yarn build
``` ```
### 关于docker容器部署 ### 关于docker容器部署
**第一步**: 构建后台服务, powershell脚本:**./build/build-aspnetcore-release.ps1**, **注意:发布后的服务需要 appsettings.Production.json 文件** **第一步**: 构建后台服务, powershell脚本:**./build/build-aspnetcore-release.ps1**, **注意:发布后的服务需要 appsettings.Production.json 文件**
**第二步**: 构建前端, **./build/build-vue-element-admin.ps1** **第二步**: 构建前端, **./build/build-vue-apps.ps1**
**第三步**: 构建后的发布地址默认在**cd ./aspnet-core/services/Publish** ,变更nginx代理服务器地址: **./client/docker/nginx/default.conf** **第三步**: 构建后的发布地址默认在**cd ./aspnet-core/services/Publish** ,变更nginx代理服务器地址: **./client/docker/nginx/default.conf**
@ -366,7 +227,7 @@ yarn build:prod
### 代码格式检查以及自动修复 ### 代码格式检查以及自动修复
```bash ```bash
yarn lint yarn lint:eslint
``` ```
### 运行单元测试 ### 运行单元测试
@ -375,34 +236,46 @@ yarn lint
yarn test:unit yarn test:unit
``` ```
### 运行端对端测试 ## 如何贡献
```bash 非常欢迎你的加入!提一个 Issue 或者提交一个 Pull Request。
yarn test:e2e
```
### 自动生成 svg 组件 **Pull Request:**
```bash 1. Fork 代码!
yarn run svg 2. 创建自己的分支: `git checkout -b feat/xxxx`
``` 3. 提交你的修改: `git commit -am 'feat(function): add xxxxx'`
4. 推送您的分支: `git push origin feat/xxxx`
5. 提交`pull request`
### 自定义 Vue 配置 ## Git 贡献提交规范
请看 [Configuration Reference](https://cli.vuejs.org/config/). - 参考 [vue](./apps/vue/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
## 浏览器支持 - `feat` 增加新功能
- `fix` 修复问题/BUG
- `style` 代码风格相关无影响运行结果的
- `perf` 优化/性能提升
- `refactor` 重构
- `revert` 撤销修改
- `test` 测试相关
- `docs` 文档/注释
- `chore` 依赖更新/脚手架配置修改等
- `workflow` 工作流改进
- `ci` 持续集成
- `types` 类型定义文件更改
- `wip` 开发中
Modern browsers and Internet Explorer 10+. ## 浏览器支持
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | 本地开发推荐使用`Chrome 80+` 浏览器
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
## 参与贡献 支持现代浏览器, 不支持 IE
请看 [CONTRIBUTING.md](https://github.com/Armour/vue-typescript-admin-template/blob/master/.github/CONTRIBUTING.md) | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| :-: | :-: | :-: | :-: | :-: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
## License ## License
[MIT License](https://github.com/Armour/vue-typescript-admin-template/blob/master/LICENSE) [MIT License](./LICENSE)

Loading…
Cancel
Save