navigator setNamespace 使用publish;

This commit is contained in:
Wang Kejun 2023-08-25 11:49:12 +08:00
parent 05d258e347
commit 22a2ed38c1
4 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@ var Navigator = /** @class */ (function (_super) {
}
Navigator.prototype.setNamespace = function (namespace) {
this.namespace = namespace;
this.publish();
};
Navigator.prototype.getLocation = function () {
var pages = getCurrentPages(); //获取加载的页面

View File

@ -21,6 +21,7 @@ var Navigator = /** @class */ (function (_super) {
};
Navigator.prototype.setNamespace = function (namespace) {
this.namespace = namespace;
this.publish();
};
Navigator.prototype.getLocation = function () {
return this.history.location;

View File

@ -23,6 +23,7 @@ export class Navigator extends Feature {
setNamespace(namespace: string) {
this.namespace = namespace;
this.publish();
}
getLocation(): Location {

View File

@ -28,6 +28,7 @@ export class Navigator extends Feature {
setNamespace(namespace: string) {
this.namespace = namespace;
this.publish();
}
getLocation() {