feat(docs): update doc
This commit is contained in:
parent
e6fa6f9a8e
commit
372a0c372c
1
docs/plugins/action-logs.md
Normal file
1
docs/plugins/action-logs.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# action-logs
|
1
docs/plugins/automations.md
Normal file
1
docs/plugins/automations.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# automations
|
2
docs/plugins/china-region.md
Normal file
2
docs/plugins/china-region.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# china-region
|
||||||
|
|
1
docs/plugins/client.md
Normal file
1
docs/plugins/client.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# client
|
@ -1,4 +1,4 @@
|
|||||||
# @nocobase/plugin-collections
|
# collections
|
||||||
|
|
||||||
提供 HTTP API 的方式管理数据表和字段
|
提供 HTTP API 的方式管理数据表和字段
|
||||||
|
|
||||||
|
1
docs/plugins/export.md
Normal file
1
docs/plugins/export.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# export
|
1
docs/plugins/file-manager.md
Normal file
1
docs/plugins/file-manager.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# file-manager
|
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Plugins
|
title: Overview
|
||||||
toc: menu
|
|
||||||
nav:
|
nav:
|
||||||
title: Plugins
|
title: Plugins
|
||||||
order: 4
|
order: 4
|
||||||
@ -8,12 +7,16 @@ nav:
|
|||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
|
|
||||||
## Plugin Manager
|
## Plugin Manager <Badge>Not Available</Badge>
|
||||||
|
|
||||||
|
<Alert title="Note">
|
||||||
|
It is not yet possible to manage plugins via the CLI, this part is still under design and development.
|
||||||
|
</Alert>
|
||||||
|
|
||||||
Development can download, activate, disable, and remove plugins via the command line, which corresponds to
|
Development can download, activate, disable, and remove plugins via the command line, which corresponds to
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
## Download plugins, which can be activated quickly with the --enable parameter
|
# Download plugins, which can be activated quickly with the --enable argument
|
||||||
yarn nocobase pm:download <plugin-name> --enable
|
yarn nocobase pm:download <plugin-name> --enable
|
||||||
# Activate the plugin
|
# Activate the plugin
|
||||||
yarn nocobase pm:enable <plugin-name>
|
yarn nocobase pm:enable <plugin-name>
|
||||||
@ -25,66 +28,36 @@ yarn nocobase pm:remove <plugin-name>
|
|||||||
|
|
||||||
## List of existing plugins
|
## List of existing plugins
|
||||||
|
|
||||||
### @nocobase/plugin-collections datasheet configuration
|
Core plugins
|
||||||
|
|
||||||
Provides an HTTP API for managing data tables and fields
|
- [@nocobase/plugin-collections](plugins/collections)
|
||||||
|
Provides an HTTP API for managing data tables and fields
|
||||||
|
- [@nocobase/plugin-permissions](plugins/permissions)
|
||||||
|
Permissions module (server-side)
|
||||||
|
- [@nocobase/plugin-users](plugins/users)
|
||||||
|
User module (server-side)
|
||||||
|
- [@nocobase/plugin-client](plugins/client)
|
||||||
|
Client-side plugin that provides a GUI for the server and connects @nocobase/server to @nocobase/client
|
||||||
|
- [@nocobase/plugin-ui-schema](plugins/ui-schema)
|
||||||
|
Store the Schema of the client SchemaComponent on the server side for on-demand dynamic output
|
||||||
|
- [@nocobase/plugin-ui-router](plugins/ui-router)
|
||||||
|
Client-side routing table, storing client-side route config on the server side for on-demand dynamic output
|
||||||
|
|
||||||
### @nocobase/plugin-permissions
|
Other plugins
|
||||||
|
|
||||||
Permissions module
|
- [@nocobase/plugin-action-logs](plugins/action-logs)
|
||||||
|
Action logs
|
||||||
### @nocobase/plugin-users
|
- [@nocobase/plugin-file-manager](plugins/file-manager)
|
||||||
|
File Manager
|
||||||
User module
|
- [@nocobase/plugin-china-region](plugins/china-region)
|
||||||
|
China region, field extensions
|
||||||
### @nocobase/plugin-system-settings
|
- [@nocobase/plugin-export](plugins/export)
|
||||||
|
Export plugin
|
||||||
Site information configuration
|
- [@nocobase/plugin-system-settings](plugins/system-settings)
|
||||||
|
System information configuration
|
||||||
### @nocobase/plugin-china-region
|
- [@nocobase/plugin-multi-apps](plugins/multi-apps)
|
||||||
|
Dynamic multi-apps, easy SaaS plugin
|
||||||
Field extension, China region
|
- [@nocobase/plugin-notifications](plugins/notifications)
|
||||||
|
Notifications module (half-finished), only supports emailing for now, no visual interface
|
||||||
### @nocobase/plugin-file-manager
|
- [@nocobase/plugin-automations](plugins/automations)
|
||||||
|
Automation module (temporarily unavailable)
|
||||||
Field extension, attachment field
|
|
||||||
|
|
||||||
### @nocobase/plugin-action-logs
|
|
||||||
|
|
||||||
Action logs
|
|
||||||
|
|
||||||
### @nocobase/plugin-multi-apps
|
|
||||||
|
|
||||||
Dynamic multi-apps, a simple SaaS
|
|
||||||
|
|
||||||
### @nocobase/plugin-export
|
|
||||||
|
|
||||||
Operation extensions, export
|
|
||||||
|
|
||||||
### @nocobase/plugin-notifications
|
|
||||||
|
|
||||||
Notifications module (half-baked), only supports emailing for now, no visual interface
|
|
||||||
|
|
||||||
### @nocobase/plugin-automations
|
|
||||||
|
|
||||||
Automation (not available at the moment)
|
|
||||||
|
|
||||||
### @nocobase/plugin-client
|
|
||||||
|
|
||||||
Client-side plugin that provides visual configuration support for nocobase. Dependent plugins are.
|
|
||||||
|
|
||||||
- @nocobase/plugin-collections (required)
|
|
||||||
- @nocobase/plugin-permissions (required)
|
|
||||||
- @nocobase/plugin-users (required)
|
|
||||||
- @nocobase/plugin-system-settings (required)
|
|
||||||
- @nocobase/plugin-file-manager (required)
|
|
||||||
- @nocobase/plugin-china-region (optional)
|
|
||||||
- @nocobase/plugin-action-logs (optional)
|
|
||||||
|
|
||||||
Several components are included.
|
|
||||||
|
|
||||||
- Store client ui-schema on the server side for on-demand dynamic output
|
|
||||||
- Store client-side ui-router on the server side for on-demand dynamic output
|
|
||||||
- Provide static server support for app dist, allowing configuration of app dist paths
|
|
||||||
- Provide initial demo data import support for nocobase installation, configurable via importData
|
|
||||||
- Provide visualization support for collections
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: 插件
|
title: 概述
|
||||||
toc: menu
|
|
||||||
nav:
|
nav:
|
||||||
title: 插件
|
title: 插件
|
||||||
order: 4
|
order: 4
|
||||||
@ -8,7 +7,11 @@ nav:
|
|||||||
|
|
||||||
# 插件
|
# 插件
|
||||||
|
|
||||||
## 插件管理器
|
## 插件管理器 <Badge>待完善</Badge>
|
||||||
|
|
||||||
|
<Alert title="注意">
|
||||||
|
暂时还不能通过 CLI 的方式管理插件,这部分还在设计开发中。
|
||||||
|
</Alert>
|
||||||
|
|
||||||
开发可以通过命令行下载、激活、禁用、移除插件,对应的命令行有:
|
开发可以通过命令行下载、激活、禁用、移除插件,对应的命令行有:
|
||||||
|
|
||||||
@ -25,66 +28,36 @@ yarn nocobase pm:remove <plugin-name>
|
|||||||
|
|
||||||
## 已有的插件列表
|
## 已有的插件列表
|
||||||
|
|
||||||
### @nocobase/plugin-collections 数据表配置
|
核心插件
|
||||||
|
|
||||||
提供 HTTP API 的方式管理数据表和字段
|
- [@nocobase/plugin-collections](plugins/collections)
|
||||||
|
提供 HTTP API 的方式管理数据表和字段
|
||||||
|
- [@nocobase/plugin-permissions](plugins/permissions)
|
||||||
|
权限模块(服务端)
|
||||||
|
- [@nocobase/plugin-users](plugins/users)
|
||||||
|
用户模块(服务端)
|
||||||
|
- [@nocobase/plugin-client](plugins/client)
|
||||||
|
客户端插件,为 server 提供 GUI,将 @nocobase/server 和 @nocobase/client 连接起来
|
||||||
|
- [@nocobase/plugin-ui-schema](plugins/ui-schema)
|
||||||
|
将客户端 SchemaComponent 的 Schema 存储在服务端,以实现按需动态输出
|
||||||
|
- [@nocobase/plugin-ui-router](plugins/ui-router)
|
||||||
|
客户端路由表,将客户端 route config 存储在服务端,以实现按需动态输出
|
||||||
|
|
||||||
### @nocobase/plugin-permissions
|
其他插件
|
||||||
|
|
||||||
权限模块
|
- [@nocobase/plugin-action-logs](plugins/action-logs)
|
||||||
|
操作日志
|
||||||
### @nocobase/plugin-users
|
- [@nocobase/plugin-file-manager](plugins/file-manager)
|
||||||
|
文件管理器
|
||||||
用户模块
|
- [@nocobase/plugin-china-region](plugins/china-region)
|
||||||
|
中国行政区,字段扩展
|
||||||
### @nocobase/plugin-system-settings
|
- [@nocobase/plugin-export](plugins/export)
|
||||||
|
导出插件
|
||||||
站点信息配置
|
- [@nocobase/plugin-system-settings](plugins/system-settings)
|
||||||
|
系统信息配置
|
||||||
### @nocobase/plugin-china-region
|
- [@nocobase/plugin-multi-apps](plugins/multi-apps)
|
||||||
|
动态多应用,简易的 SaaS 插件
|
||||||
字段扩展,中国行政区
|
- [@nocobase/plugin-notifications](plugins/notifications)
|
||||||
|
通知模块(半成品),暂时只支持邮件发送,没有可视化界面
|
||||||
### @nocobase/plugin-file-manager
|
- [@nocobase/plugin-automations](plugins/automations)
|
||||||
|
自动化模块(暂不可用)
|
||||||
字段扩展,附件字段
|
|
||||||
|
|
||||||
### @nocobase/plugin-action-logs
|
|
||||||
|
|
||||||
操作日志
|
|
||||||
|
|
||||||
### @nocobase/plugin-multi-apps
|
|
||||||
|
|
||||||
动态多应用,一个简易的 SaaS
|
|
||||||
|
|
||||||
### @nocobase/plugin-export
|
|
||||||
|
|
||||||
操作扩展,导出
|
|
||||||
|
|
||||||
### @nocobase/plugin-notifications
|
|
||||||
|
|
||||||
通知模块(半成品),暂时只支持邮件发送,没有可视化界面
|
|
||||||
|
|
||||||
### @nocobase/plugin-automations
|
|
||||||
|
|
||||||
自动化(暂不可用)
|
|
||||||
|
|
||||||
### @nocobase/plugin-client
|
|
||||||
|
|
||||||
客户端插件,为 nocobase 提供可视化配置的支持。依赖的插件有:
|
|
||||||
|
|
||||||
- @nocobase/plugin-collections(必须)
|
|
||||||
- @nocobase/plugin-permissions(必须)
|
|
||||||
- @nocobase/plugin-users(必须)
|
|
||||||
- @nocobase/plugin-system-settings(必须)
|
|
||||||
- @nocobase/plugin-file-manager(必须)
|
|
||||||
- @nocobase/plugin-china-region(可选)
|
|
||||||
- @nocobase/plugin-action-logs(可选)
|
|
||||||
|
|
||||||
包括几部分内容:
|
|
||||||
|
|
||||||
- 将客户端 ui-schema 存储在服务端,以实现按需动态输出
|
|
||||||
- 将客户端 ui-router 存储在服务端,以实现按需动态输出
|
|
||||||
- 提供 app dist 的 static server 支持,可以配置 app 的 dist 路径
|
|
||||||
- 为 nocobase 安装提供初始化 demo 数据导入的支持,可通过 importData 配置
|
|
||||||
- 提供 collections 可视化支持
|
|
||||||
|
1
docs/plugins/multi-apps.md
Normal file
1
docs/plugins/multi-apps.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# multi-apps
|
1
docs/plugins/notifications.md
Normal file
1
docs/plugins/notifications.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# notifications
|
@ -1,3 +1,3 @@
|
|||||||
# @nocobase/plugin-permissions
|
# permissions
|
||||||
|
|
||||||
|
|
||||||
|
1
docs/plugins/system-settings.md
Normal file
1
docs/plugins/system-settings.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# system-settings
|
1
docs/plugins/ui-router.md
Normal file
1
docs/plugins/ui-router.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# ui-router
|
1
docs/plugins/ui-schema.md
Normal file
1
docs/plugins/ui-schema.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# ui-schema
|
1
docs/plugins/users.md
Normal file
1
docs/plugins/users.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# users
|
@ -1,10 +1,3 @@
|
|||||||
---
|
|
||||||
nav:
|
|
||||||
title: API
|
|
||||||
order: 3
|
|
||||||
toc: menu
|
|
||||||
---
|
|
||||||
|
|
||||||
# Application
|
# Application
|
||||||
|
|
||||||
## `app.db`
|
## `app.db`
|
||||||
|
37
docs/reference/overview.md
Normal file
37
docs/reference/overview.md
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
nav:
|
||||||
|
title: API
|
||||||
|
order: 3
|
||||||
|
order: 0
|
||||||
|
---
|
||||||
|
|
||||||
|
# Overview
|
||||||
|
|
||||||
|
核心 API 总共可以分为四部分:
|
||||||
|
|
||||||
|
## Database
|
||||||
|
|
||||||
|
- [Database](database.md)
|
||||||
|
- [Repository](repository.md)
|
||||||
|
- [Collection](collection.md)
|
||||||
|
- [Model](model.md)
|
||||||
|
- [Field Types](field-types.md)
|
||||||
|
- [Operators](operators.md)
|
||||||
|
|
||||||
|
## Application
|
||||||
|
|
||||||
|
- [Application](application.md)
|
||||||
|
- [Context](context.md)
|
||||||
|
- [Resourcer](resourcer.md)
|
||||||
|
- [CLI](cli.md)
|
||||||
|
|
||||||
|
## PluginManager
|
||||||
|
|
||||||
|
- [PluginManager](plugin-manager.md)
|
||||||
|
- [Plugin](plugin.md)
|
||||||
|
|
||||||
|
## Client
|
||||||
|
|
||||||
|
- [Client](client.md)
|
||||||
|
- [JavaScript SDK(API Client)](client.md)
|
||||||
|
- [REST API](rest-api.md)
|
@ -713,6 +713,8 @@ interface destroy {
|
|||||||
|
|
||||||
interface DestroyOptions {
|
interface DestroyOptions {
|
||||||
filter?: any;
|
filter?: any;
|
||||||
|
filterByPk?: number | string | number[] | string[];
|
||||||
|
transaction?: Sequelize.Transaction;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -778,9 +780,9 @@ interface IHasOneRepository<M extends Sequelize.Model> {
|
|||||||
// 删除
|
// 删除
|
||||||
destroy(): Promise<Boolean>;
|
destroy(): Promise<Boolean>;
|
||||||
// 建立关联
|
// 建立关联
|
||||||
set(primaryKey: any): Promise<void>;
|
set(options: PrimaryKey | AssociatedOptions): Promise<void>;
|
||||||
// 移除关联
|
// 移除关联
|
||||||
remove(): Promise<void>;
|
remove(options?: AssociatedOptions): Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface HasOneFindOptions {
|
interface HasOneFindOptions {
|
||||||
@ -820,9 +822,15 @@ interface IBelongsToRepository<M extends Sequelize.Model> {
|
|||||||
// 删除
|
// 删除
|
||||||
destroy(): Promise<Boolean>;
|
destroy(): Promise<Boolean>;
|
||||||
// 建立关联
|
// 建立关联
|
||||||
set(primaryKey: any): Promise<void>;
|
set(options: PrimaryKey | AssociatedOptions): Promise<void>;
|
||||||
// 移除关联
|
// 移除关联
|
||||||
remove(): Promise<void>;
|
remove(options?: AssociatedOptions): Promise<void>;
|
||||||
|
}
|
||||||
|
|
||||||
|
type PrimaryKey = string | number;
|
||||||
|
|
||||||
|
interface AssociatedOptions {
|
||||||
|
transaction?: Sequelize.Transaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface HasOneFindOptions {
|
interface HasOneFindOptions {
|
||||||
@ -863,11 +871,18 @@ interface IHasManyRepository<M extends Sequelize.Model> {
|
|||||||
// 删除
|
// 删除
|
||||||
destroy(options?: number | string | number[] | string[] | DestroyOptions): Promise<Boolean>;
|
destroy(options?: number | string | number[] | string[] | DestroyOptions): Promise<Boolean>;
|
||||||
// 建立关联
|
// 建立关联
|
||||||
set(primaryKey: any | primaryKeys: any[]): Promise<void>;
|
set(options: PrimaryKey | PrimaryKey[] | AssociatedOptions): Promise<void>;
|
||||||
// 附加关联
|
// 附加关联
|
||||||
add(primaryKey: any | primaryKeys: any[]): Promise<void>;
|
add(options: PrimaryKey | PrimaryKey[] | AssociatedOptions): Promise<void>;
|
||||||
// 移除关联
|
// 移除关联
|
||||||
remove(primaryKey: any | primaryKeys: any[]): Promise<void>;
|
remove(options: PrimaryKey | PrimaryKey[] | AssociatedOptions): Promise<void>;
|
||||||
|
}
|
||||||
|
|
||||||
|
type PrimaryKey = string | number;
|
||||||
|
|
||||||
|
interface AssociatedOptions {
|
||||||
|
pk?: PrimaryKey | PrimaryKey[];
|
||||||
|
transaction?: Sequelize.Transaction;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -903,12 +918,19 @@ interface IBelongsToManyRepository<M extends Sequelize.Model> {
|
|||||||
// 删除
|
// 删除
|
||||||
destroy(options?: number | string | number[] | string[] | DestroyOptions): Promise<Boolean>;
|
destroy(options?: number | string | number[] | string[] | DestroyOptions): Promise<Boolean>;
|
||||||
// 建立关联
|
// 建立关联
|
||||||
set(primaryKey: any | primaryKeys: any[]): Promise<void>;
|
set(options: PrimaryKey | PrimaryKey[] | ThroughValues | ThroughValues[] | AssociatedOptions): Promise<void>;
|
||||||
// 附加关联,存在中间表数据
|
// 附加关联,存在中间表数据
|
||||||
add(primaryKey: any | primaryKeys: any[]): Promise<void>;
|
add(options: PrimaryKey | PrimaryKey[] | ThroughValues | ThroughValues[] | AssociatedOptions): Promise<void>;
|
||||||
// 移除关联
|
// 移除关联
|
||||||
remove(primaryKey: any | primaryKeys: any[]): Promise<void>;
|
remove(options: PrimaryKey | PrimaryKey[] | AssociatedOptions): Promise<void>;
|
||||||
toggle(primaryKey: any): Promise<void>;
|
toggle(options: PrimaryKey | AssociatedOptions): Promise<void>;
|
||||||
|
}
|
||||||
|
|
||||||
|
type PrimaryKey = string | number;
|
||||||
|
|
||||||
|
interface AssociatedOptions {
|
||||||
|
pk?: PrimaryKey | PrimaryKey[];
|
||||||
|
transaction?: Sequelize.Transaction;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -917,7 +939,17 @@ interface IBelongsToManyRepository<M extends Sequelize.Model> {
|
|||||||
多对多关系多了中间表的处理
|
多对多关系多了中间表的处理
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
repository.add(1);
|
||||||
|
repository.add([1, {/* 中间表数据 */}]);
|
||||||
|
repository.add([1,2,3]);
|
||||||
|
repository.add([
|
||||||
|
[1, {/* 中间表数据 */}],
|
||||||
|
[2, {/* 中间表数据 */}],
|
||||||
|
[3, {/* 中间表数据 */}],
|
||||||
|
]);
|
||||||
|
|
||||||
repository.set(1);
|
repository.set(1);
|
||||||
|
repository.set([1, {/* 中间表数据 */}]);
|
||||||
repository.set([1,2,3]);
|
repository.set([1,2,3]);
|
||||||
repository.set([
|
repository.set([
|
||||||
[1, {/* 中间表数据 */}],
|
[1, {/* 中间表数据 */}],
|
||||||
|
@ -170,7 +170,7 @@ export default {
|
|||||||
'Edit tab': '编辑标签页',
|
'Edit tab': '编辑标签页',
|
||||||
'Relationship blocks': '关系数据区块',
|
'Relationship blocks': '关系数据区块',
|
||||||
'Select record': '选择数据',
|
'Select record': '选择数据',
|
||||||
'Display name': 'Display name',
|
'Display name': '显示名称',
|
||||||
'Select icon': '选择图标',
|
'Select icon': '选择图标',
|
||||||
'Custom column name': '自定义列名称',
|
'Custom column name': '自定义列名称',
|
||||||
'Edit description': '编辑描述',
|
'Edit description': '编辑描述',
|
||||||
|
Loading…
Reference in New Issue
Block a user