@cc-component/cc-core 1.6.4 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -447,7 +447,7 @@ export class App {
447
447
  }
448
448
 
449
449
  // 通过配置关闭窗口
450
- static CloseWindowTarget(config: IBundleConfig): boolean { return App.CloseWindow(config.path.split('/').pop()); }
450
+ static CloseWindowTarget(config: IBundleConfig): boolean { return App.CloseWindow(config.name ?? config.path.split('/').pop()!); }
451
451
 
452
452
  // 关闭所有窗口
453
453
  static CloseAllWindows(): number {
@@ -468,7 +468,7 @@ export class App {
468
468
  static IsWindowOpen(className: string): boolean { return App.Ins.openedWindows.has(className); }
469
469
  // 获取已打开的窗口实例
470
470
  static GetOpenWindow<T extends Component>(config: IBundleConfig): T {
471
- const className = config.path.split('/').pop();
471
+ const className = config.name ?? config.path.split('/').pop();
472
472
  const window = App.Ins.openedWindows.get(className);
473
473
  return window ? window as T : null;
474
474
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-core",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",