diff --git a/src/editorTable/editorTable.ts b/src/editorTable/editorTable.ts index abd8d9e..670a0ec 100644 --- a/src/editorTable/editorTable.ts +++ b/src/editorTable/editorTable.ts @@ -116,7 +116,7 @@ export class EditorObject { return this._data; } - public get(key: string): any { + private get(key: string): any { let fieldInfo = this.getFieldInfo(key); if (!fieldInfo) { return undefined; @@ -192,7 +192,7 @@ export class EditorObject { } } - public set(key: string, value: ItemShape): boolean { + private set(key: string, value: ItemShape): boolean { let fieldInfo = this.getFieldInfo(key); if (!fieldInfo) { throw new Error(`未知字段:'${key}'`); diff --git a/src/editorTable/treeView.ts b/src/editorTable/treeView.ts index 48e5341..8c57d6b 100644 --- a/src/editorTable/treeView.ts +++ b/src/editorTable/treeView.ts @@ -216,7 +216,7 @@ class TreeView extends vscode.Disposable { if (!value || value === fileNode.object.name) { return; } - fileNode.object.set('name', value); + fileNode.object.data.name = value; }); // 复制对象