Skip to content

Commit efb9ad7

Browse files
authored
feat: add option to collectionsOptions for plugin-defined collections (#397)
1 parent 07c2724 commit efb9ad7

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

docs/en-US/development/server/collections/options.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ interface CollectionOptions {
2828
sortable?: CollectionSortable;
2929
model?: string;
3030
repository?: string;
31+
/* This parameter is intended for plugin developers and indicates whether the table can be managed via the system UI. Default is false.
32+
* When set to true:
33+
* 1. The table will appear in the primary data source, and deletion of the table or any of its fields will be prohibited.
34+
* 2. The table can be used in system-level features such as blocks, workflows, etc.
35+
*/
36+
uiManageable?: boolean;
3137
[key: string]: any;
3238
}
3339

@@ -49,9 +55,10 @@ interface FieldOptions {
4955
index?: boolean;
5056
interface?: string;
5157
uiSchema?: ISchema;
58+
}
5259
```
5360

54-
[Introduction to UI Schema here](/development/client/ui-schema-designer/what-is-ui-schema)
61+
[Introduction to UI Schema here](/development/client/ui-schema/what-is-ui-schema)
5562

5663
### Field Type
5764

docs/zh-CN/development/server/collections/options.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ interface CollectionOptions {
2828
sortable?: CollectionSortable;
2929
model?: string;
3030
repository?: string;
31+
/* 该参数是给插件开发者使用,表示是否允许被系统界面管理,默认 false。设置为 true 时:
32+
* 1. 会出现在主数据源,并且不允许删除此表和表中的任何字段
33+
* 2. 允许在系统场景中(区块、工作流等)使用此表
34+
*/
35+
uiManageable?: boolean;
3136
[key: string]: any;
3237
}
3338

@@ -51,7 +56,7 @@ interface FieldOptions {
5156
uiSchema?: ISchema;
5257
```
5358
54-
[UI Schema 的介绍点此查看](/development/client/ui-schema-designer/what-is-ui-schema)
59+
[UI Schema 的介绍点此查看](/development/client/ui-schema/what-is-ui-schema)
5560
5661
### Field Type
5762

0 commit comments

Comments
 (0)