diff --git a/agents/noco/common/core.ts b/agents/noco/common/core.ts index d9d93ac..049949b 100644 --- a/agents/noco/common/core.ts +++ b/agents/noco/common/core.ts @@ -18,7 +18,7 @@ export class Core { key = 'core'; title = '默认表'; description = '默认表描述'; - tableId?: string; + #tableId?: string; constructor(opts: { nocoApi: NocoApi, baseId?: string, @@ -28,6 +28,15 @@ export class Core { this.baseId = opts.baseId; this.tableId = opts.tableId; } + get tableId() { + return this.#tableId; + } + set tableId(id: string | undefined) { + this.#tableId = id; + if (this.nocoApi.record && id) { + this.nocoApi.record.table = id; + } + } async createTable(opts?: { columns?: any[], title?: string, description?: string, baseId?: string }): Promise> { const baseId = opts?.baseId ?? this.baseId!; const title = opts?.title ?? this.title;