zova-ui-empty 5.0.145 → 5.0.147

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-ui-empty",
3
- "version": "5.0.145",
3
+ "version": "5.0.147",
4
4
  "description": "A vue3 empty framework with ioc",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -35,10 +35,10 @@
35
35
  "vue": "^3.4.29",
36
36
  "vue-router": "^4.3.3",
37
37
  "zod": "^3.23.8",
38
- "zova": "^5.0.106",
38
+ "zova": "^5.0.107",
39
39
  "zova-module-a-data": "^5.0.7",
40
40
  "zova-module-a-pinia": "^5.0.19",
41
- "zova-module-a-router": "^5.0.39",
41
+ "zova-module-a-router": "^5.0.40",
42
42
  "zova-module-a-style": "^5.0.13"
43
43
  },
44
44
  "devDependencies": {
@@ -52,5 +52,5 @@
52
52
  "zova-vite": "^1.0.109"
53
53
  },
54
54
  "license": "MIT",
55
- "gitHead": "d32d7f5d1482b24d66e6fcac13b6b3d7d677d6cb"
55
+ "gitHead": "8816955c45f2fc3911d5eebf5b09764f54777123"
56
56
  }
@@ -5,7 +5,7 @@ import { ScopeModule } from '../resource/this.js';
5
5
  @Data()
6
6
  export class DataMenu extends BeanDataBase<ScopeModule> {
7
7
  select() {
8
- return this.$useQuery({
8
+ return this.$useQueryExisting({
9
9
  queryKey: ['select'],
10
10
  queryFn: async () => {
11
11
  const data = await this.scope.service.menu.select();
@@ -1,7 +1,5 @@
1
1
  import { BeanControllerBase, Local, Use } from 'zova';
2
2
  import { DataMenu } from '../../bean/data.menu.js';
3
- import { DataQuery } from 'zova-module-a-data';
4
- import { ServiceMenuEntity } from '../../api/index.js';
5
3
 
6
4
  export interface Props {}
7
5
 
@@ -16,12 +14,9 @@ export class ControllerLayoutDefault extends BeanControllerBase<unknown, Props,
16
14
  @Use()
17
15
  $$dataMenu: DataMenu;
18
16
 
19
- queryMenus: DataQuery<ServiceMenuEntity[]>;
20
17
  leftDrawerOpen: boolean = false;
21
18
 
22
- protected async __init__() {
23
- this.queryMenus = this.$$dataMenu.select();
24
- }
19
+ protected async __init__() {}
25
20
 
26
21
  toggleLeftDrawer() {
27
22
  this.leftDrawerOpen = !this.leftDrawerOpen;
@@ -27,9 +27,10 @@ export class RenderLayoutDefault extends BeanRenderBase {
27
27
  );
28
28
  }
29
29
  _renderMenu() {
30
- if (this.queryMenus.isLoading || !this.queryMenus.data) return;
30
+ const queryMenus = this.$$dataMenu.select();
31
+ if (queryMenus.isLoading || !queryMenus.data) return;
31
32
  const domItems: JSX.Element[] = [];
32
- for (const item of this.queryMenus.data) {
33
+ for (const item of queryMenus.data) {
33
34
  domItems.push(this._renderMenuItem(item));
34
35
  }
35
36
  return <div class="menu-list">{domItems}</div>;
@@ -1,10 +1,10 @@
1
1
  import { Local } from 'zova';
2
2
  import { ScopeModule } from '../resource/this.js';
3
- import { BeanRouterLike, BeanRouterBase } from 'zova-module-a-router';
3
+ import { BeanRouter, BeanRouterBase } from 'zova-module-a-router';
4
4
 
5
5
  @Local()
6
6
  export class Router extends BeanRouterBase<ScopeModule> {
7
- protected onRouterGuards(router: BeanRouterLike) {
7
+ protected onRouterGuards(router: BeanRouter) {
8
8
  router.beforeEach(async _to => {
9
9
  //console.log(to);
10
10
  });