mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:36:44 +00:00
fix(plugin-field-sort): fix ts type
This commit is contained in:
parent
2ac5457583
commit
0e95e36432
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Plugin } from '@nocobase/server';
|
import { Plugin } from '@nocobase/server';
|
||||||
import { DataSource } from '@nocobase/data-source-manager';
|
import { DataSource, SequelizeCollectionManager } from '@nocobase/data-source-manager';
|
||||||
|
|
||||||
import { SortField } from './sort-field';
|
import { SortField } from './sort-field';
|
||||||
import { move } from './action';
|
import { move } from './action';
|
||||||
@ -25,8 +25,7 @@ export class PluginFieldSortServer extends Plugin {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.app.dataSourceManager.beforeAddDataSource((dataSource: DataSource) => {
|
this.app.dataSourceManager.beforeAddDataSource((dataSource: DataSource) => {
|
||||||
// @ts-ignore
|
if (dataSource.collectionManager instanceof SequelizeCollectionManager) {
|
||||||
if (dataSource.collectionManager?.db) {
|
|
||||||
dataSource.resourceManager.registerActionHandlers({ move });
|
dataSource.resourceManager.registerActionHandlers({ move });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user