@zhongguo168a/yxeditor-common 0.0.32 → 0.0.34

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.
package/dist/index.d.ts CHANGED
@@ -1107,7 +1107,7 @@ declare class ViewController extends Controller {
1107
1107
  * 当视图需要通过路由打开时,需要实现此方法
1108
1108
  * @param route
1109
1109
  */
1110
- open(route: Route): View;
1110
+ open(route?: Route): View;
1111
1111
  protected onOpening(view: View): void;
1112
1112
  protected onOpened(view: View): void;
1113
1113
  protected onClosing(view: View): void;
package/dist/index.esm.js CHANGED
@@ -3839,6 +3839,9 @@ class ViewController extends Controller {
3839
3839
  * @param route
3840
3840
  */
3841
3841
  open(route) {
3842
+ if (!route) {
3843
+ route = this.route;
3844
+ }
3842
3845
  let oldView = viewrepo.getByRoute(route);
3843
3846
  if (oldView) {
3844
3847
  this.closeView(oldView);
@@ -3916,6 +3919,9 @@ class ViewController extends Controller {
3916
3919
  * @returns
3917
3920
  */
3918
3921
  close(route) {
3922
+ if (!route) {
3923
+ route = this.route;
3924
+ }
3919
3925
  let view = viewrepo.getByRoute(route);
3920
3926
  if (view) {
3921
3927
  this.closeView(view);