mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 02:06:14 +00:00
fix: collection options
This commit is contained in:
parent
aa76b78da4
commit
bd77ef2bd3
@ -15,7 +15,10 @@ export class Collection implements ICollection {
|
|||||||
repository: IRepository;
|
repository: IRepository;
|
||||||
fields: Map<string, IField> = new Map<string, IField>();
|
fields: Map<string, IField> = new Map<string, IField>();
|
||||||
|
|
||||||
constructor(protected options: CollectionOptions, protected collectionManager: ICollectionManager) {
|
constructor(
|
||||||
|
protected options: CollectionOptions,
|
||||||
|
protected collectionManager: ICollectionManager,
|
||||||
|
) {
|
||||||
this.setRepository(options.repository);
|
this.setRepository(options.repository);
|
||||||
|
|
||||||
if (options.fields) {
|
if (options.fields) {
|
||||||
@ -23,6 +26,10 @@ export class Collection implements ICollection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get name() {
|
||||||
|
return this.options.name;
|
||||||
|
}
|
||||||
|
|
||||||
updateOptions(options: CollectionOptions, mergeOptions?: any) {
|
updateOptions(options: CollectionOptions, mergeOptions?: any) {
|
||||||
const newOptions = {
|
const newOptions = {
|
||||||
...this.options,
|
...this.options,
|
||||||
|
Loading…
Reference in New Issue
Block a user