ele-admin-plus 1.1.6-beta.1 → 1.1.6-beta.2
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/README.md +1 -1
- package/es/ele-app/types/components.d.ts +2 -2
- package/es/ele-app/types/index.d.ts +2 -0
- package/es/ele-config-provider/index.d.ts +2 -2
- package/es/ele-config-provider/index.js +6 -6
- package/es/ele-config-provider/props.d.ts +2 -2
- package/es/ele-config-provider/props.js +3 -3
- package/es/ele-config-provider/receiver.d.ts +3 -3
- package/es/ele-config-provider/receiver.js +103 -99
- package/es/ele-config-provider/types/index.d.ts +5 -7
- package/es/ele-data-table/index.d.ts +11 -13
- package/es/ele-data-table/index.js +1 -1
- package/es/ele-data-table/props.d.ts +5 -5
- package/es/ele-data-table/style/index.scss +6 -1
- package/es/ele-file-list/components/file-grid-item.js +5 -3
- package/es/ele-file-list/components/file-grid.d.ts +1 -0
- package/es/ele-file-list/components/file-grid.js +8 -1
- package/es/ele-file-list/components/file-table-item.js +5 -3
- package/es/ele-file-list/components/file-table.d.ts +1 -0
- package/es/ele-file-list/components/file-table.js +8 -1
- package/es/ele-modal/index.d.ts +1 -1
- package/es/ele-modal/index.js +37 -13
- package/es/ele-popconfirm/index.d.ts +8 -11
- package/es/ele-popconfirm/props.d.ts +5 -6
- package/es/ele-popover/index.d.ts +12 -15
- package/es/ele-popover/props.d.ts +4 -5
- package/es/ele-popover/props.js +1 -1
- package/es/ele-printer/index.d.ts +5 -3
- package/es/ele-printer/index.js +4 -3
- package/es/ele-printer/props.d.ts +4 -2
- package/es/ele-printer/props.js +3 -1
- package/es/ele-printer/types/index.d.ts +5 -1
- package/es/ele-printer/util.d.ts +6 -0
- package/es/ele-printer/util.js +11 -3
- package/es/ele-pro-layout/components/pro-header.js +8 -3
- package/es/ele-pro-layout/components/pro-sidebar.js +6 -5
- package/es/ele-pro-layout/components/pro-sidebox.js +6 -5
- package/es/ele-pro-layout/components/tab-dropdown.js +4 -3
- package/es/ele-pro-layout/index.d.ts +20 -22
- package/es/ele-pro-layout/index.js +51 -4
- package/es/ele-pro-layout/props.js +1 -1
- package/es/ele-pro-layout/style/layout-mobile.scss +4 -0
- package/es/ele-pro-table/index.d.ts +11 -11
- package/es/ele-pro-table/props.d.ts +5 -5
- package/es/ele-tabs/components/tab-title.js +6 -5
- package/es/ele-virtual-table/props.d.ts +5 -5
- package/lib/ele-app/types/components.d.ts +2 -2
- package/lib/ele-app/types/index.d.ts +2 -0
- package/lib/ele-config-provider/index.d.ts +2 -2
- package/lib/ele-config-provider/index.js +6 -6
- package/lib/ele-config-provider/props.d.ts +2 -2
- package/lib/ele-config-provider/props.js +3 -3
- package/lib/ele-config-provider/receiver.d.ts +3 -3
- package/lib/ele-config-provider/receiver.js +2 -2
- package/lib/ele-config-provider/types/index.d.ts +5 -7
- package/lib/ele-data-table/index.d.ts +11 -13
- package/lib/ele-data-table/index.js +1 -1
- package/lib/ele-data-table/props.d.ts +5 -5
- package/lib/ele-data-table/style/index.scss +6 -1
- package/lib/ele-file-list/components/file-grid-item.js +5 -3
- package/lib/ele-file-list/components/file-grid.d.ts +1 -0
- package/lib/ele-file-list/components/file-grid.js +8 -1
- package/lib/ele-file-list/components/file-table-item.js +5 -3
- package/lib/ele-file-list/components/file-table.d.ts +1 -0
- package/lib/ele-file-list/components/file-table.js +8 -1
- package/lib/ele-modal/index.d.ts +1 -1
- package/lib/ele-modal/index.js +36 -12
- package/lib/ele-popconfirm/index.d.ts +8 -11
- package/lib/ele-popconfirm/props.d.ts +5 -6
- package/lib/ele-popover/index.d.ts +12 -15
- package/lib/ele-popover/props.d.ts +4 -5
- package/lib/ele-popover/props.js +1 -1
- package/lib/ele-printer/index.d.ts +5 -3
- package/lib/ele-printer/index.js +3 -2
- package/lib/ele-printer/props.d.ts +4 -2
- package/lib/ele-printer/props.js +3 -1
- package/lib/ele-printer/types/index.d.ts +5 -1
- package/lib/ele-printer/util.d.ts +6 -0
- package/lib/ele-printer/util.js +11 -3
- package/lib/ele-pro-layout/components/pro-header.js +8 -3
- package/lib/ele-pro-layout/components/pro-sidebar.js +5 -4
- package/lib/ele-pro-layout/components/pro-sidebox.js +5 -4
- package/lib/ele-pro-layout/components/tab-dropdown.js +4 -3
- package/lib/ele-pro-layout/index.d.ts +20 -22
- package/lib/ele-pro-layout/index.js +51 -4
- package/lib/ele-pro-layout/props.js +1 -1
- package/lib/ele-pro-layout/style/layout-mobile.scss +4 -0
- package/lib/ele-pro-table/index.d.ts +11 -11
- package/lib/ele-pro-table/props.d.ts +5 -5
- package/lib/ele-tabs/components/tab-title.js +6 -5
- package/lib/ele-virtual-table/props.d.ts +5 -5
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ import { EleTooltipInstance } from '../ele-app/types/components';
|
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
transition: {
|
|
5
5
|
type: StringConstructor;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
8
|
bodyClass: StringConstructor;
|
|
9
9
|
bodyStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
10
10
|
titleStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
@@ -46,12 +46,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
46
46
|
title: StringConstructor;
|
|
47
47
|
width: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 150, boolean>;
|
|
48
48
|
popperClass: StringConstructor;
|
|
49
|
-
bg: StringConstructor;
|
|
50
|
-
arrowBg: StringConstructor;
|
|
51
|
-
isPopover: BooleanConstructor;
|
|
52
49
|
id: StringConstructor;
|
|
53
50
|
role: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "menu" | "group" | "listbox" | "grid" | "tooltip" | "dialog" | "navigation" | "tree", unknown, "tooltip", boolean>;
|
|
54
51
|
strategy: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "fixed" | "absolute", unknown, "absolute", boolean>;
|
|
52
|
+
bg: StringConstructor;
|
|
55
53
|
arrowOffset: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 5, boolean>;
|
|
56
54
|
triggerKeys: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => string[], boolean>;
|
|
57
55
|
virtualRef: {
|
|
@@ -68,8 +66,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
66
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
69
67
|
__epPropKey: true;
|
|
70
68
|
};
|
|
71
|
-
rawContent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
72
69
|
ariaLabel: StringConstructor;
|
|
70
|
+
className: StringConstructor;
|
|
73
71
|
pure: BooleanConstructor;
|
|
74
72
|
focusOnShow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
75
73
|
trapping: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
@@ -90,7 +88,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
88
|
boundariesPadding: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
91
89
|
fallbackPlacements: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]) | ((new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]))[], unknown, unknown, undefined, boolean>;
|
|
92
90
|
gpuAcceleration: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
93
|
-
|
|
91
|
+
arrowBg: StringConstructor;
|
|
92
|
+
isPopover: BooleanConstructor;
|
|
94
93
|
}, {
|
|
95
94
|
tooltipRef: import("vue").Ref<EleTooltipInstance>;
|
|
96
95
|
tooltipProps: import("vue").ComputedRef<Partial<TooltipProps>>;
|
|
@@ -109,8 +108,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
109
108
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
110
109
|
transition: {
|
|
111
110
|
type: StringConstructor;
|
|
112
|
-
default: string;
|
|
113
|
-
};
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
114
113
|
bodyClass: StringConstructor;
|
|
115
114
|
bodyStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
116
115
|
titleStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
@@ -152,12 +151,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
152
151
|
title: StringConstructor;
|
|
153
152
|
width: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 150, boolean>;
|
|
154
153
|
popperClass: StringConstructor;
|
|
155
|
-
bg: StringConstructor;
|
|
156
|
-
arrowBg: StringConstructor;
|
|
157
|
-
isPopover: BooleanConstructor;
|
|
158
154
|
id: StringConstructor;
|
|
159
155
|
role: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "menu" | "group" | "listbox" | "grid" | "tooltip" | "dialog" | "navigation" | "tree", unknown, "tooltip", boolean>;
|
|
160
156
|
strategy: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "fixed" | "absolute", unknown, "absolute", boolean>;
|
|
157
|
+
bg: StringConstructor;
|
|
161
158
|
arrowOffset: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 5, boolean>;
|
|
162
159
|
triggerKeys: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => string[], boolean>;
|
|
163
160
|
virtualRef: {
|
|
@@ -174,8 +171,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
174
171
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
175
172
|
__epPropKey: true;
|
|
176
173
|
};
|
|
177
|
-
rawContent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
178
174
|
ariaLabel: StringConstructor;
|
|
175
|
+
className: StringConstructor;
|
|
179
176
|
pure: BooleanConstructor;
|
|
180
177
|
focusOnShow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
181
178
|
trapping: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
@@ -196,7 +193,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
196
193
|
boundariesPadding: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
197
194
|
fallbackPlacements: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]) | ((new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]))[], unknown, unknown, undefined, boolean>;
|
|
198
195
|
gpuAcceleration: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
199
|
-
|
|
196
|
+
arrowBg: StringConstructor;
|
|
197
|
+
isPopover: BooleanConstructor;
|
|
200
198
|
}>> & {
|
|
201
199
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
202
200
|
"onBefore-enter"?: (() => any) | undefined;
|
|
@@ -220,7 +218,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
220
218
|
virtualTriggering: boolean;
|
|
221
219
|
open: boolean;
|
|
222
220
|
content: string;
|
|
223
|
-
rawContent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
224
221
|
persistent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
225
222
|
visible: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => boolean) | (() => boolean | null) | ((new (...args: any[]) => boolean) | (() => boolean | null))[], unknown, unknown>;
|
|
226
223
|
transition: string;
|
|
@@ -52,12 +52,10 @@ export declare const popoverProps: {
|
|
|
52
52
|
title: StringConstructor;
|
|
53
53
|
width: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 150, boolean>;
|
|
54
54
|
popperClass: StringConstructor;
|
|
55
|
-
bg: StringConstructor;
|
|
56
|
-
arrowBg: StringConstructor;
|
|
57
|
-
isPopover: BooleanConstructor;
|
|
58
55
|
id: StringConstructor;
|
|
59
56
|
role: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "menu" | "group" | "listbox" | "grid" | "tooltip" | "dialog" | "navigation" | "tree", unknown, "tooltip", boolean>;
|
|
60
57
|
strategy: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "fixed" | "absolute", unknown, "absolute", boolean>;
|
|
58
|
+
bg: StringConstructor;
|
|
61
59
|
arrowOffset: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 5, boolean>;
|
|
62
60
|
triggerKeys: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => string[], boolean>;
|
|
63
61
|
virtualRef: {
|
|
@@ -74,8 +72,8 @@ export declare const popoverProps: {
|
|
|
74
72
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
75
73
|
__epPropKey: true;
|
|
76
74
|
};
|
|
77
|
-
rawContent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
78
75
|
ariaLabel: StringConstructor;
|
|
76
|
+
className: StringConstructor;
|
|
79
77
|
pure: BooleanConstructor;
|
|
80
78
|
focusOnShow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
81
79
|
trapping: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
@@ -96,7 +94,8 @@ export declare const popoverProps: {
|
|
|
96
94
|
boundariesPadding: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
97
95
|
fallbackPlacements: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]) | ((new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]))[], unknown, unknown, undefined, boolean>;
|
|
98
96
|
gpuAcceleration: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
99
|
-
|
|
97
|
+
arrowBg: StringConstructor;
|
|
98
|
+
isPopover: BooleanConstructor;
|
|
100
99
|
};
|
|
101
100
|
export type PopoverProps = ExtractPropTypes<typeof popoverProps>;
|
|
102
101
|
/**
|
package/lib/ele-popover/props.js
CHANGED
|
@@ -5,7 +5,7 @@ const core = require("../utils/core");
|
|
|
5
5
|
const props = require("../ele-tooltip/props");
|
|
6
6
|
const normalizeProps = core.omit(elementPlus.popoverProps, ["onUpdate:visible"]);
|
|
7
7
|
const popoverProps = {
|
|
8
|
-
...props.tooltipProps,
|
|
8
|
+
...core.omit(props.tooltipProps, ["rawContent"]),
|
|
9
9
|
popperClass: String,
|
|
10
10
|
...normalizeProps,
|
|
11
11
|
transition: {
|
|
@@ -5,15 +5,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
footerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
6
6
|
title: StringConstructor;
|
|
7
7
|
margin: (StringConstructor | NumberConstructor)[];
|
|
8
|
-
direction: import("vue").PropType<
|
|
8
|
+
direction: import("vue").PropType<string | null>;
|
|
9
9
|
orientation: import("vue").PropType<import("./types").PrintOrientation | null>;
|
|
10
10
|
target: import("vue").PropType<import("./types").PrintTarget | null>;
|
|
11
11
|
static: BooleanConstructor;
|
|
12
|
+
options: ObjectConstructor; /** 是否显示 */
|
|
12
13
|
}, {
|
|
13
14
|
container: import("vue").ShallowRef<Element>;
|
|
14
15
|
visible: import("vue").Ref<boolean>;
|
|
15
16
|
isStatic: import("vue").ComputedRef<boolean>;
|
|
16
|
-
print: () => void;
|
|
17
|
+
print: (options?: any) => void;
|
|
17
18
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
19
|
'update:modelValue': (_value: boolean) => boolean;
|
|
19
20
|
done: () => boolean;
|
|
@@ -24,10 +25,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
24
25
|
footerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
25
26
|
title: StringConstructor;
|
|
26
27
|
margin: (StringConstructor | NumberConstructor)[];
|
|
27
|
-
direction: import("vue").PropType<
|
|
28
|
+
direction: import("vue").PropType<string | null>;
|
|
28
29
|
orientation: import("vue").PropType<import("./types").PrintOrientation | null>;
|
|
29
30
|
target: import("vue").PropType<import("./types").PrintTarget | null>;
|
|
30
31
|
static: BooleanConstructor;
|
|
32
|
+
options: ObjectConstructor; /** 是否显示 */
|
|
31
33
|
}>> & {
|
|
32
34
|
"onUpdate:modelValue"?: ((_value: boolean) => any) | undefined;
|
|
33
35
|
onDone?: (() => any) | undefined;
|
package/lib/ele-printer/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
18
18
|
const isStatic = vue.computed(() => {
|
|
19
19
|
return props2.static;
|
|
20
20
|
});
|
|
21
|
-
const print = () => {
|
|
21
|
+
const print = (options) => {
|
|
22
22
|
if (!authenticated.value) {
|
|
23
23
|
updateModelValue(false);
|
|
24
24
|
return;
|
|
@@ -30,7 +30,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
30
30
|
title: props2.title,
|
|
31
31
|
margin: props2.margin,
|
|
32
32
|
direction: props2.direction,
|
|
33
|
-
orientation: props2.orientation
|
|
33
|
+
orientation: props2.orientation,
|
|
34
|
+
options: util.mergeOptions(props2.options, options)
|
|
34
35
|
};
|
|
35
36
|
if (props2.target === "_iframe") {
|
|
36
37
|
util.doPrintOnFrame(option);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PrintOrientation, PrintTarget } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* 属性
|
|
5
5
|
*/
|
|
@@ -17,13 +17,15 @@ export declare const printerProps: {
|
|
|
17
17
|
/** 页间距 */
|
|
18
18
|
margin: (StringConstructor | NumberConstructor)[];
|
|
19
19
|
/** 纸张方向 */
|
|
20
|
-
direction: PropType<
|
|
20
|
+
direction: PropType<string | null>;
|
|
21
21
|
/** 纸张旋转 */
|
|
22
22
|
orientation: PropType<PrintOrientation | null>;
|
|
23
23
|
/** 打印位置 */
|
|
24
24
|
target: PropType<PrintTarget | null>;
|
|
25
25
|
/** 是否显示在文档流中 */
|
|
26
26
|
static: BooleanConstructor;
|
|
27
|
+
/** 打印方法参数 */
|
|
28
|
+
options: ObjectConstructor;
|
|
27
29
|
};
|
|
28
30
|
export type PrinterProps = ExtractPropTypes<typeof printerProps>;
|
|
29
31
|
/**
|
package/lib/ele-printer/props.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 纸张方向
|
|
3
3
|
*/
|
|
4
|
-
export type PrintDirection = 'landscape' | 'portrait';
|
|
4
|
+
export type PrintDirection = 'landscape' | 'portrait' | string;
|
|
5
5
|
/**
|
|
6
6
|
* 纸张旋转
|
|
7
7
|
*/
|
|
@@ -24,6 +24,8 @@ export interface PrintOption {
|
|
|
24
24
|
direction?: string | null;
|
|
25
25
|
/** 纸张旋转 */
|
|
26
26
|
orientation?: string | null;
|
|
27
|
+
/** 打印方法参数 */
|
|
28
|
+
options?: any;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* pdf 打印参数
|
|
@@ -37,4 +39,6 @@ export interface PrintPdfOption {
|
|
|
37
39
|
done?: () => void;
|
|
38
40
|
/** 错误回调 */
|
|
39
41
|
error?: (status: number, result: string) => void;
|
|
42
|
+
/** 打印方法参数 */
|
|
43
|
+
options?: any;
|
|
40
44
|
}
|
|
@@ -26,6 +26,12 @@ export declare function removePrintFrame(): void;
|
|
|
26
26
|
* 生成打印设置的样式
|
|
27
27
|
*/
|
|
28
28
|
export declare function getOptionCss(opt: PrintOption): string;
|
|
29
|
+
/**
|
|
30
|
+
* 合并打印方法参数
|
|
31
|
+
* @param options 参数
|
|
32
|
+
* @param userOptions 自定义参数
|
|
33
|
+
*/
|
|
34
|
+
export declare function mergeOptions(options?: any, userOptions?: any): any;
|
|
29
35
|
/**
|
|
30
36
|
* usePrinter
|
|
31
37
|
*/
|
package/lib/ele-printer/util.js
CHANGED
|
@@ -28,7 +28,7 @@ function doPrint(option) {
|
|
|
28
28
|
if (option.title != null && option.title !== "") {
|
|
29
29
|
document.title = option.title;
|
|
30
30
|
}
|
|
31
|
-
window.print();
|
|
31
|
+
window.print(option.options);
|
|
32
32
|
$html.classList.remove(printingClass);
|
|
33
33
|
document.body.removeChild(elem);
|
|
34
34
|
if (option.title != null) {
|
|
@@ -55,6 +55,7 @@ function doPrintOnFrame(opt) {
|
|
|
55
55
|
el.setAttribute("value", el.value);
|
|
56
56
|
});
|
|
57
57
|
pDoc.open();
|
|
58
|
+
const printOption = opt.options ? `JSON.parse('${JSON.stringify(opt.options)}')` : "";
|
|
58
59
|
const optHtml = `
|
|
59
60
|
<style type="text/css" media="print">
|
|
60
61
|
${getOptionCss(opt)}
|
|
@@ -68,7 +69,7 @@ function doPrintOnFrame(opt) {
|
|
|
68
69
|
if(${opt.title == null ? 0 : 1}) {
|
|
69
70
|
document.title = '${opt.title}';
|
|
70
71
|
}
|
|
71
|
-
window.print();
|
|
72
|
+
window.print(${printOption});
|
|
72
73
|
window.parent.postMessage('elePrintDone_${opt.printId}', '*');
|
|
73
74
|
};
|
|
74
75
|
<\/script>
|
|
@@ -112,6 +113,12 @@ function getOptionCss(opt) {
|
|
|
112
113
|
css.push("}");
|
|
113
114
|
return css.join(" ");
|
|
114
115
|
}
|
|
116
|
+
function mergeOptions(options, userOptions) {
|
|
117
|
+
if (options == null) {
|
|
118
|
+
return userOptions;
|
|
119
|
+
}
|
|
120
|
+
return Object.assign({}, options, userOptions);
|
|
121
|
+
}
|
|
115
122
|
function usePrinter(done) {
|
|
116
123
|
const printId = core.uuid(8);
|
|
117
124
|
const onMessage = (e) => {
|
|
@@ -131,7 +138,7 @@ function printPdf(option) {
|
|
|
131
138
|
pFrame.onload = () => {
|
|
132
139
|
if (!!pFrame.getAttribute("src")) {
|
|
133
140
|
pFrame.focus();
|
|
134
|
-
pFrame.contentWindow && pFrame.contentWindow.print();
|
|
141
|
+
pFrame.contentWindow && pFrame.contentWindow.print(option.options);
|
|
135
142
|
option.done && option.done();
|
|
136
143
|
}
|
|
137
144
|
};
|
|
@@ -166,6 +173,7 @@ exports.doPrintOnFrame = doPrintOnFrame;
|
|
|
166
173
|
exports.getOptionCss = getOptionCss;
|
|
167
174
|
exports.getPrintContainer = getPrintContainer;
|
|
168
175
|
exports.getPrintFrame = getPrintFrame;
|
|
176
|
+
exports.mergeOptions = mergeOptions;
|
|
169
177
|
exports.printContainerId = printContainerId;
|
|
170
178
|
exports.printFrameId = printFrameId;
|
|
171
179
|
exports.printPdf = printPdf;
|
|
@@ -41,7 +41,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
41
41
|
/** 是否显示面包屑导航 */
|
|
42
42
|
breadcrumb: Boolean,
|
|
43
43
|
/** 面包屑导航分隔符 */
|
|
44
|
-
breadcrumbSeparator: [String, Object],
|
|
44
|
+
breadcrumbSeparator: [String, Object, Function],
|
|
45
45
|
/** 主页路由地址 */
|
|
46
46
|
homePath: String,
|
|
47
47
|
/** 当前路由是否是主页 */
|
|
@@ -81,6 +81,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
81
81
|
const data = [];
|
|
82
82
|
if (!props.isHome) {
|
|
83
83
|
data.push({
|
|
84
|
+
key: props.homePath,
|
|
84
85
|
to: props.homePath,
|
|
85
86
|
icon: icons.HomeOutlined,
|
|
86
87
|
iconStyle: {
|
|
@@ -182,14 +183,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
182
183
|
onClose: _ctx.onClose,
|
|
183
184
|
onItemClick: _ctx.onItemClick
|
|
184
185
|
}, vue.createSlots({ _: 2 }, [
|
|
185
|
-
_ctx.iconSlot &&
|
|
186
|
+
_ctx.iconSlot && !["logo", "left", "right", "center", "breadcrumb"].includes(
|
|
187
|
+
_ctx.iconSlot
|
|
188
|
+
) && _ctx.$slots[_ctx.iconSlot] ? {
|
|
186
189
|
name: "icon",
|
|
187
190
|
fn: vue.withCtx((slotProps) => [
|
|
188
191
|
vue.renderSlot(_ctx.$slots, _ctx.iconSlot, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
189
192
|
]),
|
|
190
193
|
key: "0"
|
|
191
194
|
} : void 0,
|
|
192
|
-
_ctx.titleSlot &&
|
|
195
|
+
_ctx.titleSlot && !["logo", "left", "right", "center", "breadcrumb"].includes(
|
|
196
|
+
_ctx.titleSlot
|
|
197
|
+
) && _ctx.$slots[_ctx.titleSlot] ? {
|
|
193
198
|
name: "title",
|
|
194
199
|
fn: vue.withCtx((slotProps) => [
|
|
195
200
|
vue.renderSlot(_ctx.$slots, _ctx.titleSlot, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
@@ -82,7 +82,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
82
82
|
class: "ele-admin-menus"
|
|
83
83
|
}, {
|
|
84
84
|
default: vue.withCtx(() => [
|
|
85
|
-
vue.
|
|
85
|
+
_ctx.menuItems.length ? (vue.openBlock(), vue.createBlock(_component_EleMenus, {
|
|
86
|
+
key: 0,
|
|
86
87
|
items: _ctx.menuItems,
|
|
87
88
|
theme: _ctx.sidebarStyle,
|
|
88
89
|
colorful: _ctx.colorfulIcon,
|
|
@@ -96,21 +97,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
96
97
|
onClose: _ctx.onClose,
|
|
97
98
|
onItemClick: _ctx.onItemClick
|
|
98
99
|
}, vue.createSlots({ _: 2 }, [
|
|
99
|
-
_ctx.iconSlot && _ctx.$slots[_ctx.iconSlot] ? {
|
|
100
|
+
_ctx.iconSlot && !["top", "bottom"].includes(_ctx.iconSlot) && _ctx.$slots[_ctx.iconSlot] ? {
|
|
100
101
|
name: "icon",
|
|
101
102
|
fn: vue.withCtx((slotProps) => [
|
|
102
103
|
vue.renderSlot(_ctx.$slots, _ctx.iconSlot, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
103
104
|
]),
|
|
104
105
|
key: "0"
|
|
105
106
|
} : void 0,
|
|
106
|
-
_ctx.titleSlot && _ctx.$slots[_ctx.titleSlot] ? {
|
|
107
|
+
_ctx.titleSlot && !["top", "bottom"].includes(_ctx.titleSlot) && _ctx.$slots[_ctx.titleSlot] ? {
|
|
107
108
|
name: "title",
|
|
108
109
|
fn: vue.withCtx((slotProps) => [
|
|
109
110
|
vue.renderSlot(_ctx.$slots, _ctx.titleSlot, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
110
111
|
]),
|
|
111
112
|
key: "1"
|
|
112
113
|
} : void 0
|
|
113
|
-
]), 1032, ["items", "theme", "colorful", "collapse", "defaultActive", "defaultOpeneds", "uniqueOpened", "popperEffect", "onOpen", "onClose", "onItemClick"])
|
|
114
|
+
]), 1032, ["items", "theme", "colorful", "collapse", "defaultActive", "defaultOpeneds", "uniqueOpened", "popperEffect", "onOpen", "onClose", "onItemClick"])) : vue.createCommentVNode("", true)
|
|
114
115
|
]),
|
|
115
116
|
_: 3
|
|
116
117
|
}, 512),
|
|
@@ -72,7 +72,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
72
72
|
class: "ele-admin-menus"
|
|
73
73
|
}, {
|
|
74
74
|
default: vue.withCtx(() => [
|
|
75
|
-
vue.
|
|
75
|
+
_ctx.menuItems.length ? (vue.openBlock(), vue.createBlock(_component_EleMenus, {
|
|
76
|
+
key: 0,
|
|
76
77
|
items: _ctx.menuItems,
|
|
77
78
|
theme: _ctx.sidebarStyle,
|
|
78
79
|
popupColorful: _ctx.colorfulIcon,
|
|
@@ -85,21 +86,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
85
86
|
tooltipDisabled: !_ctx.compact,
|
|
86
87
|
onItemClick: _ctx.onItemClick
|
|
87
88
|
}, vue.createSlots({ _: 2 }, [
|
|
88
|
-
_ctx.iconSlot && _ctx.$slots[_ctx.iconSlot] ? {
|
|
89
|
+
_ctx.iconSlot && !["boxTop", "boxBottom"].includes(_ctx.iconSlot) && _ctx.$slots[_ctx.iconSlot] ? {
|
|
89
90
|
name: "icon",
|
|
90
91
|
fn: vue.withCtx((slotProps) => [
|
|
91
92
|
vue.renderSlot(_ctx.$slots, _ctx.iconSlot, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
92
93
|
]),
|
|
93
94
|
key: "0"
|
|
94
95
|
} : void 0,
|
|
95
|
-
_ctx.titleSlot && _ctx.$slots[_ctx.titleSlot] ? {
|
|
96
|
+
_ctx.titleSlot && !["boxTop", "boxBottom"].includes(_ctx.titleSlot) && _ctx.$slots[_ctx.titleSlot] ? {
|
|
96
97
|
name: "title",
|
|
97
98
|
fn: vue.withCtx((slotProps) => [
|
|
98
99
|
vue.renderSlot(_ctx.$slots, _ctx.titleSlot, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
99
100
|
]),
|
|
100
101
|
key: "1"
|
|
101
102
|
} : void 0
|
|
102
|
-
]), 1032, ["items", "theme", "popupColorful", "collapse", "defaultActive", "popperEffect", "tooltipDisabled", "onItemClick"])
|
|
103
|
+
]), 1032, ["items", "theme", "popupColorful", "collapse", "defaultActive", "popperEffect", "tooltipDisabled", "onItemClick"])) : vue.createCommentVNode("", true)
|
|
103
104
|
]),
|
|
104
105
|
_: 3
|
|
105
106
|
}, 512),
|
|
@@ -59,13 +59,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
59
59
|
const _component_EleTabTool = vue.resolveComponent("EleTabTool");
|
|
60
60
|
return vue.openBlock(), vue.createBlock(_component_EleTabTool, null, {
|
|
61
61
|
default: vue.withCtx(() => [
|
|
62
|
-
vue.createVNode(_component_EleDropdown, vue.mergeProps(
|
|
63
|
-
ref: "dropdownRef",
|
|
62
|
+
vue.createVNode(_component_EleDropdown, vue.mergeProps({
|
|
64
63
|
placement: "bottom-end",
|
|
65
64
|
popperClass: "ele-tab-popup",
|
|
66
65
|
popperOptions: {
|
|
67
66
|
modifiers: [{ name: "offset", options: { offset: [12, 8] } }]
|
|
68
|
-
}
|
|
67
|
+
}
|
|
68
|
+
}, _ctx.dropdownProps, {
|
|
69
|
+
ref: "dropdownRef",
|
|
69
70
|
items: _ctx.items,
|
|
70
71
|
onCommand: _ctx.onCommand
|
|
71
72
|
}), vue.createSlots({
|
|
@@ -54,12 +54,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
default: string;
|
|
55
55
|
};
|
|
56
56
|
headerStyle: {
|
|
57
|
-
/** 面包屑数据 */
|
|
58
57
|
type: import("vue").PropType<import("./types").HeaderStyle>;
|
|
59
|
-
default: string;
|
|
60
|
-
};
|
|
58
|
+
default: string; /** 页签数据 */
|
|
59
|
+
}; /** 页签数据 */
|
|
61
60
|
sidebarStyle: {
|
|
62
|
-
type: import("vue").PropType<import("./types").SidebarStyle>;
|
|
61
|
+
type: import("vue").PropType<import("./types").SidebarStyle>;
|
|
63
62
|
default: string;
|
|
64
63
|
};
|
|
65
64
|
tabStyle: {
|
|
@@ -77,12 +76,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
77
76
|
default: boolean;
|
|
78
77
|
};
|
|
79
78
|
logoInHeader: BooleanConstructor;
|
|
80
|
-
colorfulIcon: BooleanConstructor;
|
|
79
|
+
colorfulIcon: BooleanConstructor;
|
|
81
80
|
uniqueOpened: {
|
|
82
81
|
type: BooleanConstructor;
|
|
83
82
|
default: boolean;
|
|
84
83
|
};
|
|
85
84
|
expanded: BooleanConstructor;
|
|
85
|
+
/** 侧栏是否隐藏 */
|
|
86
86
|
compressOnEsc: BooleanConstructor;
|
|
87
87
|
fixedHome: {
|
|
88
88
|
type: BooleanConstructor;
|
|
@@ -91,7 +91,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
91
91
|
homePath: StringConstructor;
|
|
92
92
|
redirectPath: {
|
|
93
93
|
type: StringConstructor;
|
|
94
|
-
/** 主页地址 */
|
|
95
94
|
default: string;
|
|
96
95
|
};
|
|
97
96
|
locale: StringConstructor;
|
|
@@ -99,15 +98,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
99
98
|
sidebarOpeneds: import("vue").PropType<string[]>;
|
|
100
99
|
tabContextMenu: import("vue").PropType<boolean | import("../ele-app/types/components").EleDropdownProps>;
|
|
101
100
|
tabContextMenus: import("vue").PropType<import("../ele-tabs/types").ContextMenus>;
|
|
102
|
-
tabSortable: BooleanConstructor;
|
|
101
|
+
tabSortable: BooleanConstructor;
|
|
103
102
|
autoScrollTop: {
|
|
104
103
|
type: BooleanConstructor;
|
|
105
|
-
default: boolean;
|
|
106
|
-
};
|
|
104
|
+
default: boolean; /** 是否双侧栏布局 */
|
|
105
|
+
};
|
|
107
106
|
headerTitleSlot: {
|
|
108
107
|
type: StringConstructor;
|
|
109
108
|
default: string;
|
|
110
|
-
};
|
|
109
|
+
}; /** 是否显示双侧栏一级 */
|
|
111
110
|
headerIconSlot: {
|
|
112
111
|
type: StringConstructor;
|
|
113
112
|
default: string;
|
|
@@ -125,7 +124,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
125
124
|
default: string;
|
|
126
125
|
};
|
|
127
126
|
sideboxIconSlot: {
|
|
128
|
-
type: StringConstructor;
|
|
127
|
+
type: StringConstructor;
|
|
129
128
|
default: string;
|
|
130
129
|
};
|
|
131
130
|
tooltipEffect: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "light" | "dark", unknown> | undefined>;
|
|
@@ -245,12 +244,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
245
244
|
default: string;
|
|
246
245
|
};
|
|
247
246
|
headerStyle: {
|
|
248
|
-
/** 面包屑数据 */
|
|
249
247
|
type: import("vue").PropType<import("./types").HeaderStyle>;
|
|
250
|
-
default: string;
|
|
251
|
-
};
|
|
248
|
+
default: string; /** 页签数据 */
|
|
249
|
+
}; /** 页签数据 */
|
|
252
250
|
sidebarStyle: {
|
|
253
|
-
type: import("vue").PropType<import("./types").SidebarStyle>;
|
|
251
|
+
type: import("vue").PropType<import("./types").SidebarStyle>;
|
|
254
252
|
default: string;
|
|
255
253
|
};
|
|
256
254
|
tabStyle: {
|
|
@@ -268,12 +266,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
268
266
|
default: boolean;
|
|
269
267
|
};
|
|
270
268
|
logoInHeader: BooleanConstructor;
|
|
271
|
-
colorfulIcon: BooleanConstructor;
|
|
269
|
+
colorfulIcon: BooleanConstructor;
|
|
272
270
|
uniqueOpened: {
|
|
273
271
|
type: BooleanConstructor;
|
|
274
272
|
default: boolean;
|
|
275
273
|
};
|
|
276
274
|
expanded: BooleanConstructor;
|
|
275
|
+
/** 侧栏是否隐藏 */
|
|
277
276
|
compressOnEsc: BooleanConstructor;
|
|
278
277
|
fixedHome: {
|
|
279
278
|
type: BooleanConstructor;
|
|
@@ -282,7 +281,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
282
281
|
homePath: StringConstructor;
|
|
283
282
|
redirectPath: {
|
|
284
283
|
type: StringConstructor;
|
|
285
|
-
/** 主页地址 */
|
|
286
284
|
default: string;
|
|
287
285
|
};
|
|
288
286
|
locale: StringConstructor;
|
|
@@ -290,15 +288,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
290
288
|
sidebarOpeneds: import("vue").PropType<string[]>;
|
|
291
289
|
tabContextMenu: import("vue").PropType<boolean | import("../ele-app/types/components").EleDropdownProps>;
|
|
292
290
|
tabContextMenus: import("vue").PropType<import("../ele-tabs/types").ContextMenus>;
|
|
293
|
-
tabSortable: BooleanConstructor;
|
|
291
|
+
tabSortable: BooleanConstructor;
|
|
294
292
|
autoScrollTop: {
|
|
295
293
|
type: BooleanConstructor;
|
|
296
|
-
default: boolean;
|
|
297
|
-
};
|
|
294
|
+
default: boolean; /** 是否双侧栏布局 */
|
|
295
|
+
};
|
|
298
296
|
headerTitleSlot: {
|
|
299
297
|
type: StringConstructor;
|
|
300
298
|
default: string;
|
|
301
|
-
};
|
|
299
|
+
}; /** 是否显示双侧栏一级 */
|
|
302
300
|
headerIconSlot: {
|
|
303
301
|
type: StringConstructor;
|
|
304
302
|
default: string;
|
|
@@ -316,7 +314,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
316
314
|
default: string;
|
|
317
315
|
};
|
|
318
316
|
sideboxIconSlot: {
|
|
319
|
-
type: StringConstructor;
|
|
317
|
+
type: StringConstructor;
|
|
320
318
|
default: string;
|
|
321
319
|
};
|
|
322
320
|
tooltipEffect: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "light" | "dark", unknown> | undefined>;
|