This commit is contained in:
2025-12-12 11:57:12 +08:00
parent 63e853641b
commit 32db5ec306
3 changed files with 75 additions and 60 deletions

View File

@@ -13,7 +13,7 @@ export type CoreOptions<T = {}> = {
export class Core {
nocoApi: NocoApi;
baseId?: string;
#baseId?: string;
key = 'core';
title = '默认表';
description = '默认表描述';
@@ -36,6 +36,12 @@ export class Core {
this.nocoApi.record.table = id;
}
}
get baseId() {
return this.#baseId;
}
set baseId(id: string | undefined) {
this.#baseId = id;
}
async createTable(opts?: { columns?: any[], title?: string, description?: string, baseId?: string }): Promise<ReponseData<{ id: string, title: string }>> {
const baseId = opts?.baseId ?? this.baseId!;
const title = opts?.title ?? this.title;