zova-ui-empty 5.0.145 → 5.0.146
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.
|
|
3
|
+
"version": "5.0.146",
|
|
4
4
|
"description": "A vue3 empty framework with ioc",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"zova-vite": "^1.0.109"
|
|
53
53
|
},
|
|
54
54
|
"license": "MIT",
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "c76a5085b26279381a94a4b2c64ed8c9ad00d78b"
|
|
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.$
|
|
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
|
-
|
|
30
|
+
const queryMenus = this.$$dataMenu.select();
|
|
31
|
+
if (queryMenus.isLoading || !queryMenus.data) return;
|
|
31
32
|
const domItems: JSX.Element[] = [];
|
|
32
|
-
for (const item of
|
|
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>;
|