zova-module-a-router 5.0.64 → 5.0.66
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/package.json +2 -2
- package/src/.metadata/index.ts +1 -1
- package/src/.metadata/modules.d.ts +15 -0
- package/src/config/config.ts +2 -4
- package/src/monkey.ts +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-router",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.66",
|
|
4
4
|
"title": "a-router",
|
|
5
5
|
"zovaModule": {
|
|
6
6
|
"capabilities": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"vue-router": "^4.4.5"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "483437e571f796b9ec67986973c94fe069d584cd"
|
|
44
44
|
}
|
package/src/.metadata/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ import { BeanScopeBase, Scope, TypeModuleResource } from 'zova';
|
|
|
24
24
|
@Scope()
|
|
25
25
|
export class ScopeModuleARouter extends BeanScopeBase {}
|
|
26
26
|
|
|
27
|
-
export interface ScopeModuleARouter extends TypeModuleResource<
|
|
27
|
+
export interface ScopeModuleARouter extends TypeModuleResource<typeof config, any, any, any, any> {}
|
|
28
28
|
|
|
29
29
|
import 'zova';
|
|
30
30
|
declare module 'zova' {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'zova-module-a-test';
|
|
2
|
+
import 'zova-module-a-demo';
|
|
3
|
+
import 'zova-module-demo-todo';
|
|
4
|
+
import 'zova-module-a-model';
|
|
5
|
+
import 'zova-module-a-router';
|
|
6
|
+
import 'zova-module-a-style';
|
|
7
|
+
import 'zova-module-a-core';
|
|
8
|
+
import 'zova-module-home-base';
|
|
9
|
+
import 'zova-module-home-icon';
|
|
10
|
+
import 'zova-module-home-index';
|
|
11
|
+
import 'zova-module-home-layout';
|
|
12
|
+
import 'zova-module-home-user';
|
|
13
|
+
import 'zova-module-a-pinia';
|
|
14
|
+
import 'zova-module-a-tabs';
|
|
15
|
+
import 'zova-module-devui-adapter';
|
package/src/config/config.ts
CHANGED
package/src/monkey.ts
CHANGED
|
@@ -16,8 +16,6 @@ import {
|
|
|
16
16
|
import * as ModuleInfo from '@cabloy/module-info';
|
|
17
17
|
import { useRoute } from 'vue-router';
|
|
18
18
|
import { BeanRouter } from './bean/bean.router.js';
|
|
19
|
-
import { ScopeModule, __ThisModule__ } from './.metadata/this.js';
|
|
20
|
-
import { markRaw } from 'vue';
|
|
21
19
|
import { getRealRouteName } from './utils.js';
|
|
22
20
|
import { LocalRouter } from './bean/local.router.js';
|
|
23
21
|
|
|
@@ -27,7 +25,6 @@ export class Monkey
|
|
|
27
25
|
{
|
|
28
26
|
private _moduleSelf: IModule;
|
|
29
27
|
private _beanRouter: BeanRouter;
|
|
30
|
-
private _beanComponentDefault: any;
|
|
31
28
|
localRouter: LocalRouter;
|
|
32
29
|
|
|
33
30
|
constructor(moduleSelf: IModule) {
|
|
@@ -48,9 +45,6 @@ export class Monkey
|
|
|
48
45
|
this.localRouter = await this.bean._newBean(LocalRouter, false);
|
|
49
46
|
}
|
|
50
47
|
async appInitialized() {
|
|
51
|
-
// component default
|
|
52
|
-
const scope: ScopeModule = await this.bean.getScope(__ThisModule__);
|
|
53
|
-
this._beanComponentDefault = await this.bean.getScope(scope.config.defaultComponent);
|
|
54
48
|
// emit event
|
|
55
49
|
await this.app.meta.event.emit('a-router:routerGuards', this._beanRouter);
|
|
56
50
|
}
|
|
@@ -68,7 +62,6 @@ export class Monkey
|
|
|
68
62
|
}
|
|
69
63
|
}
|
|
70
64
|
async beanInit(bean: BeanContainer, beanInstance: BeanBase) {
|
|
71
|
-
const self = this;
|
|
72
65
|
bean.defineProperty(beanInstance, '$router', {
|
|
73
66
|
enumerable: false,
|
|
74
67
|
configurable: true,
|
|
@@ -76,13 +69,6 @@ export class Monkey
|
|
|
76
69
|
return bean._getBeanFromHost('a-router.bean.router');
|
|
77
70
|
},
|
|
78
71
|
});
|
|
79
|
-
bean.defineProperty(beanInstance, '$component', {
|
|
80
|
-
enumerable: false,
|
|
81
|
-
configurable: true,
|
|
82
|
-
get() {
|
|
83
|
-
return markRaw(self._beanComponentDefault.component);
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
72
|
}
|
|
87
73
|
async moduleLoading(module: IModule) {
|
|
88
74
|
if (this._moduleSelf === module) return;
|