docs: 优化文档

This commit is contained in:
wanchun 2022-04-18 13:30:47 +08:00
parent 7fd99a6b01
commit c7e92ecfec
5 changed files with 13 additions and 16 deletions

View File

@ -62,6 +62,7 @@ export const zh: SidebarConfig = {
'/reference/plugin/plugins/sass.md',
'/reference/plugin/plugins/editor.md',
'/reference/plugin/plugins/pinia.md',
'/reference/plugin/plugins/watermark.md',
],
},
{

View File

@ -17,6 +17,7 @@
| [@fesjs/plugin-monaco-editor](./plugins/editor.md) | 提供代码编辑器能力, 基于`monaco-editor`VS Code使用的代码编辑器 |
| [@fesjs/plugin-windicss](./plugins/windicss.md) | 基于 `windicss`,提供原子化 CSS 能力 |
| [@fesjs/plugin-pinia](./plugins/pinia.md) | 基于 `pinia`,提供状态管理 |
| [@fesjs/plugin-watermark](./plugins/watermark.md) | 水印 |
## 架构

View File

@ -69,9 +69,7 @@ export default {
}
```
## 配置
### 编译时配置
## 编译时配置
在执行 `fes dev` 或者 `fes build` 时,通过此配置生成运行时的代码,在配置文件`.fes.js` 中配置:
```js
export default {
@ -83,7 +81,7 @@ export default {
}
```
#### roles
### roles
- **类型**:对象
- **默认值**`{}`
@ -93,10 +91,10 @@ export default {
角色预定义列表。`key` 是角色 Id `value`是角色 Id 对应的资源列表。
### 运行时配置
## 运行时配置
`app.js` 中配置
#### unAccessHandler
### unAccessHandler
- **类型**`Function`
- **默认值**`null`
@ -128,7 +126,7 @@ export const access = {
```
#### noFoundHandler
### noFoundHandler
- **类型**`Function`
- **默认值**`null`

View File

@ -15,9 +15,8 @@
}
```
## 配置
### 编译时配置
## 编译时配置
在执行 `fes dev` 或者 `fes build` 时,通过此配置生成运行时的代码,在配置文件`.fes.js` 中配置:
```js
export default {
@ -29,17 +28,17 @@ export default {
我们通过 `monaco-editor-webpack-plugin` 集成 `Monaco Editor``ESM`版本,所以编辑时其实就是 `monaco-editor-webpack-plugin` 的配置,具体配置项参考[文档](https://github.com/Microsoft/monaco-editor-webpack-plugin)。
#### filename
### filename
- **类型**自定义worker脚本名称
- **默认值**`'[name].worker.js'`
#### publicPath
### publicPath
- **类型**自定义worker脚本的路径
- **默认值**`''`
#### languages
### languages
- **类型**:需要支持的语言类型
- **默认值**`['abap', 'apex', 'azcli', 'bat', 'bicep', 'cameligo', 'clojure', 'coffee', 'cpp', 'csharp', 'csp', 'css', 'dart', 'dockerfile', 'ecl', 'elixir', 'fsharp', 'go', 'graphql', 'handlebars', 'hcl', 'html', 'ini', 'java', 'javascript', 'json', 'julia', 'kotlin', 'less', 'lexon', 'liquid', 'lua', 'm3', 'markdown', 'mips', 'msdax', 'mysql', 'objective-c', 'pascal', 'pascaligo', 'perl', 'pgsql', 'php', 'postiats', 'powerquery', 'powershell', 'pug', 'python', 'qsharp', 'r', 'razor', 'redis', 'redshift', 'restructuredtext', 'ruby', 'rust', 'sb', 'scala', 'scheme', 'scss', 'shell', 'solidity', 'sophia', 'sparql', 'sql', 'st', 'swift', 'systemverilog', 'tcl', 'twig', 'typescript', 'vb', 'xml', 'yaml']`

View File

@ -14,9 +14,7 @@
}
```
## 配置
### 编译时配置
## 编译时配置
```js
export default {
@ -26,7 +24,7 @@ export default {
}
```
#### disabled
### disabled
是否禁用水印,默认是`false`