fix(theme-editor): remove db.sync
This commit is contained in:
parent
4e979bc7b7
commit
fa2de8e806
@ -1,4 +1,3 @@
|
|||||||
import { defineCollection } from '@nocobase/database';
|
|
||||||
import { InstallOptions, Plugin } from '@nocobase/server';
|
import { InstallOptions, Plugin } from '@nocobase/server';
|
||||||
|
|
||||||
export class ThemeEditorPlugin extends Plugin {
|
export class ThemeEditorPlugin extends Plugin {
|
||||||
@ -7,8 +6,7 @@ export class ThemeEditorPlugin extends Plugin {
|
|||||||
beforeLoad() {}
|
beforeLoad() {}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
this.db.collection(
|
this.db.collection({
|
||||||
defineCollection({
|
|
||||||
name: 'themeConfig',
|
name: 'themeConfig',
|
||||||
fields: [
|
fields: [
|
||||||
// 主题配置内容,一个 JSON 字符串
|
// 主题配置内容,一个 JSON 字符串
|
||||||
@ -26,10 +24,7 @@ export class ThemeEditorPlugin extends Plugin {
|
|||||||
name: 'isBuiltIn',
|
name: 'isBuiltIn',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
});
|
||||||
);
|
|
||||||
|
|
||||||
await this.db.sync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async install(options?: InstallOptions) {}
|
async install(options?: InstallOptions) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user