Skip to content

Commit

Permalink
fix: disable toggle variable for expSetter & add isValid to workspace (
Browse files Browse the repository at this point in the history
…#146)

* fix: add isValid to test if valid project

* fix: disable toggle variable for expSetter
  • Loading branch information
wwsun authored May 8, 2024
1 parent f7c837a commit b52bbad
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 20,937 deletions.
7 changes: 7 additions & 0 deletions packages/core/src/models/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,16 @@ export interface IWorkspace {
* 解析后的项目配置信息
*/
get projectConfig(): ITangoConfigJson;
/**
* 当前活动的视图文件
*/
get activeViewModule(): IViewFile;
get pages(): any[];
get bizComps(): string[];
get baseComps(): string[];
get localComps(): string[];
/**
* 是否是合法的项目
*/
get isValid(): boolean;
}
7 changes: 7 additions & 0 deletions packages/core/src/models/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ export class Workspace extends EventTarget implements IWorkspace {
*/
private copyTempNodes: TangoNode[];

/**
* 是否是合法的项目
*/
get isValid() {
return !!this.tangoConfigJson && !!this.activeViewModule;
}

/**
* 项目配置,返回解析后的 tango.config.json 文件
*/
Expand Down
Loading

0 comments on commit b52bbad

Please sign in to comment.