@oinone/kunlun-vue-admin-layout 7.2.13 → 7.2.14

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.
@@ -1,4 +1,4 @@
1
- import { type ReloadMaskCallChainingParameters, type RuntimeViewAction } from '@oinone/kunlun-engine';
1
+ import { type IMultiTabsManager, type MultiTabInstance, type ReloadMaskCallChainingParameters, type RuntimeViewAction } from '@oinone/kunlun-engine';
2
2
  import { type Matched, Router } from '@oinone/kunlun-router';
3
3
  import { TreeNode } from '@oinone/kunlun-shared';
4
4
  import { MaskWidget } from '../../basic';
@@ -29,5 +29,7 @@ export declare class BreadcrumbWidget extends MaskWidget {
29
29
  protected refreshItems(model: string, action: string, parameters: MenuUrlParameters | undefined): Promise<void>;
30
30
  protected refreshViewTitle(model: string, action: string, parameters?: Record<string, unknown>): Promise<void>;
31
31
  protected reloadMaskProcess(reloadParameters: ReloadMaskCallChainingParameters): Promise<void>;
32
+ protected onActiveTab(manager: IMultiTabsManager, instance: MultiTabInstance): Promise<void>;
32
33
  protected $$mounted(): void;
34
+ protected $$unmounted(): void;
33
35
  }
@@ -0,0 +1,24 @@
1
+ import type { CSSStyle } from '@oinone/kunlun-shared';
2
+ import { type PropType } from 'vue';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ id: {
5
+ type: StringConstructor;
6
+ };
7
+ classNames: {
8
+ type: PropType<string | string[]>;
9
+ };
10
+ style: {
11
+ type: PropType<string | CSSStyle>;
12
+ };
13
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
+ id: {
15
+ type: StringConstructor;
16
+ };
17
+ classNames: {
18
+ type: PropType<string | string[]>;
19
+ };
20
+ style: {
21
+ type: PropType<string | CSSStyle>;
22
+ };
23
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
24
+ export default _default;
@@ -52,8 +52,8 @@ export declare class MultiTabsWidget extends MaskWidget {
52
52
  protected generatorTabTitle(tab: MultiTabInstance): string;
53
53
  protected reloadActiveTab(): Promise<void>;
54
54
  protected reloadMainViewProcess(reloadParameters: ReloadMainViewCallChainingParameters): Promise<void>;
55
- protected onActive: (manager: IMultiTabsManager, instance: MultiTabInstance) => void;
56
- protected onClose: (manager: IMultiTabsManager, instance: MultiTabInstance) => void;
55
+ protected onActive(manager: IMultiTabsManager, instance: MultiTabInstance): void;
56
+ protected onClose(manager: IMultiTabsManager, instance: MultiTabInstance): void;
57
57
  protected $$created(): void;
58
58
  protected $$mounted(): void;
59
59
  protected $$unmounted(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oinone/kunlun-vue-admin-layout",
3
- "version": "7.2.13",
3
+ "version": "7.2.14",
4
4
  "type": "module",
5
5
  "main": "dist/oinone-kunlun-vue-admin-layout.esm.js",
6
6
  "scripts": {
@@ -18,14 +18,15 @@
18
18
  "doc": "typedoc --out docs src/index.ts"
19
19
  },
20
20
  "dependencies": {
21
- "@oinone/kunlun-vue-router": "7.2.13",
22
- "@oinone/kunlun-vue-ui": "7.2.13",
23
- "@oinone/kunlun-vue-ui-antd": "7.2.13",
24
- "@oinone/kunlun-vue-ui-common": "7.2.13",
25
- "@oinone/kunlun-vue-widget": "7.2.13",
21
+ "@oinone/kunlun-vue-router": "7.2.14",
22
+ "@oinone/kunlun-vue-ui": "7.2.14",
23
+ "@oinone/kunlun-vue-ui-antd": "7.2.14",
24
+ "@oinone/kunlun-vue-ui-common": "7.2.14",
25
+ "@oinone/kunlun-vue-widget": "7.2.14",
26
26
  "vue-json-pretty": "^2.4.0"
27
27
  },
28
28
  "devDependencies": {
29
+ "@oinone/kunlun-compile": "~7.2.0",
29
30
  "@oinone/kunlun-dsl": "~7.2.0",
30
31
  "@oinone/kunlun-engine": "~7.2.0",
31
32
  "@oinone/kunlun-environment": "~7.2.0",
@@ -42,6 +43,7 @@
42
43
  "graphql": "15.8.0",
43
44
  "graphql-tag": "2.12.6",
44
45
  "lodash-es": "4.17.21",
46
+ "rollup": "4.53.5",
45
47
  "sass": "1.97.0",
46
48
  "sass-loader": "16.0.6"
47
49
  },
@@ -2,6 +2,9 @@ import {
2
2
  BreadcrumbConfigManager,
3
3
  executeViewAction,
4
4
  generatorViewActionQueryParameter,
5
+ type IMultiTabsManager,
6
+ type MultiTabInstance,
7
+ MultiTabsManager,
5
8
  type ReloadMaskCallChainingParameters,
6
9
  type RuntimeViewAction,
7
10
  ViewActionCache
@@ -159,9 +162,38 @@ export class BreadcrumbWidget extends MaskWidget {
159
162
  ]);
160
163
  }
161
164
 
165
+ protected async onActiveTab(manager: IMultiTabsManager, instance: MultiTabInstance) {
166
+ const { action: runtimeViewAction, parameters } = instance.stack[instance.stack.length - 1];
167
+ if (!parameters) {
168
+ return;
169
+ }
170
+ const { module, model, action } = parameters;
171
+ if (!module || !model || !action) {
172
+ return;
173
+ }
174
+
175
+ await this.reloadMaskProcess({
176
+ module,
177
+ model,
178
+ action,
179
+
180
+ viewName: runtimeViewAction.resViewName,
181
+ viewType: runtimeViewAction.resViewType,
182
+ target: runtimeViewAction.target,
183
+
184
+ currentPage: parameters
185
+ });
186
+ }
187
+
162
188
  protected $$mounted() {
163
189
  super.$$mounted();
164
190
  this.matched = useMatched().matched;
165
191
  this.router = useRouter().router;
192
+ MultiTabsManager.INSTANCE.onActive(this.onActiveTab.bind(this));
193
+ }
194
+
195
+ protected $$unmounted() {
196
+ super.$$unmounted();
197
+ MultiTabsManager.INSTANCE.clearOnActive(this.onActiveTab);
166
198
  }
167
199
  }
@@ -407,17 +407,17 @@ export class MultiTabsWidget extends MaskWidget {
407
407
  await this.reloadActiveTab();
408
408
  }
409
409
 
410
- protected onActive = (manager: IMultiTabsManager, instance: MultiTabInstance) => {
410
+ protected onActive(manager: IMultiTabsManager, instance: MultiTabInstance) {
411
411
  this.activeKey = instance.key;
412
- };
412
+ }
413
413
 
414
- protected onClose = (manager: IMultiTabsManager, instance: MultiTabInstance) => {
414
+ protected onClose(manager: IMultiTabsManager, instance: MultiTabInstance) {
415
415
  const { key } = instance;
416
416
  const targetTab = this.getTabs().find((v) => v.key === key);
417
417
  if (targetTab) {
418
418
  this.onCloseTab(targetTab);
419
419
  }
420
- };
420
+ }
421
421
 
422
422
  protected $$created(): void {
423
423
  super.$$created();
@@ -1,88 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
2
- ADivider: {
3
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
4
- prefixCls: StringConstructor;
5
- type: {
6
- type: import("vue").PropType<"" | "vertical" | "horizontal">;
7
- default: string;
8
- };
9
- dashed: {
10
- type: BooleanConstructor;
11
- default: boolean;
12
- };
13
- orientation: {
14
- type: import("vue").PropType<"left" | "right" | "center">;
15
- default: string;
16
- };
17
- plain: {
18
- type: BooleanConstructor;
19
- default: boolean;
20
- };
21
- orientationMargin: (StringConstructor | NumberConstructor)[];
22
- }>> & Readonly<{}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
23
- type: "" | "vertical" | "horizontal";
24
- dashed: boolean;
25
- orientation: "left" | "right" | "center";
26
- plain: boolean;
27
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
28
- P: {};
29
- B: {};
30
- D: {};
31
- C: {};
32
- M: {};
33
- Defaults: {};
34
- }, Readonly<import("vue").ExtractPropTypes<{
35
- prefixCls: StringConstructor;
36
- type: {
37
- type: import("vue").PropType<"" | "vertical" | "horizontal">;
38
- default: string;
39
- };
40
- dashed: {
41
- type: BooleanConstructor;
42
- default: boolean;
43
- };
44
- orientation: {
45
- type: import("vue").PropType<"left" | "right" | "center">;
46
- default: string;
47
- };
48
- plain: {
49
- type: BooleanConstructor;
50
- default: boolean;
51
- };
52
- orientationMargin: (StringConstructor | NumberConstructor)[];
53
- }>> & Readonly<{}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, {
54
- type: "" | "vertical" | "horizontal";
55
- dashed: boolean;
56
- orientation: "left" | "right" | "center";
57
- plain: boolean;
58
- }>;
59
- __isFragment?: never;
60
- __isTeleport?: never;
61
- __isSuspense?: never;
62
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
63
- prefixCls: StringConstructor;
64
- type: {
65
- type: import("vue").PropType<"" | "vertical" | "horizontal">;
66
- default: string;
67
- };
68
- dashed: {
69
- type: BooleanConstructor;
70
- default: boolean;
71
- };
72
- orientation: {
73
- type: import("vue").PropType<"left" | "right" | "center">;
74
- default: string;
75
- };
76
- plain: {
77
- type: BooleanConstructor;
78
- default: boolean;
79
- };
80
- orientationMargin: (StringConstructor | NumberConstructor)[];
81
- }>> & Readonly<{}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
82
- type: "" | "vertical" | "horizontal";
83
- dashed: boolean;
84
- orientation: "left" | "right" | "center";
85
- plain: boolean;
86
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin<any[], any[]>));
87
- }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
88
- export default _default;