ele-admin-plus 1.5.0-beta.1 → 1.5.0-beta.3
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/es/ele-admin-layout/props.d.ts +1 -1
- package/es/ele-backtop/index.d.ts +4 -4
- package/es/ele-basic-select/index.d.ts +4 -4
- package/es/ele-config-provider/components/receiver-view.d.ts +2 -2
- package/es/ele-ellipsis/index.d.ts +2 -2
- package/es/ele-icon-select/index.d.ts +4 -4
- package/es/ele-modal/props.d.ts +2 -2
- package/es/ele-pro-layout/index.d.ts +2 -2
- package/es/ele-pro-layout/props.d.ts +1 -1
- package/es/ele-pro-table/index.d.ts +2 -2
- package/es/ele-pro-table/props.d.ts +1 -1
- package/es/ele-tab-tool/index.d.ts +2 -2
- package/es/ele-table-select/index.d.ts +4 -4
- package/es/ele-table-select/props.d.ts +2 -2
- package/es/ele-tooltip/index.d.ts +2 -2
- package/es/ele-tooltip/props.d.ts +1 -1
- package/es/ele-tree-select/index.d.ts +4 -4
- package/es/ele-tree-select/props.d.ts +2 -2
- package/es/ele-watermark/index.d.ts +2 -2
- package/es/ele-watermark/util.js +1 -1
- package/es/utils/common.d.ts +1 -3
- package/es/utils/common.js +1 -1
- package/es/utils/core.d.ts +15 -1
- package/es/utils/core.js +47 -2
- package/lib/ele-admin-layout/props.d.ts +1 -1
- package/lib/ele-backtop/index.d.ts +4 -4
- package/lib/ele-basic-select/index.d.ts +4 -4
- package/lib/ele-config-provider/components/receiver-view.d.ts +2 -2
- package/lib/ele-ellipsis/index.d.ts +2 -2
- package/lib/ele-icon-select/index.d.ts +4 -4
- package/lib/ele-modal/props.d.ts +2 -2
- package/lib/ele-pro-layout/index.d.ts +2 -2
- package/lib/ele-pro-layout/props.d.ts +1 -1
- package/lib/ele-pro-table/index.d.ts +2 -2
- package/lib/ele-pro-table/props.d.ts +1 -1
- package/lib/ele-tab-tool/index.d.ts +2 -2
- package/lib/ele-table-select/index.d.ts +4 -4
- package/lib/ele-table-select/props.d.ts +2 -2
- package/lib/ele-tooltip/index.d.ts +2 -2
- package/lib/ele-tooltip/props.d.ts +1 -1
- package/lib/ele-tree-select/index.d.ts +4 -4
- package/lib/ele-tree-select/props.d.ts +2 -2
- package/lib/ele-watermark/index.d.ts +2 -2
- package/lib/ele-watermark/util.cjs +1 -1
- package/lib/utils/common.cjs +1 -1
- package/lib/utils/common.d.ts +1 -3
- package/lib/utils/core.cjs +47 -2
- package/lib/utils/core.d.ts +15 -1
- package/package.json +3 -1
|
@@ -12,7 +12,7 @@ import { Layout, SidebarLayout, HeaderStyle, SidebarStyle, TabStyle, TabBar, Max
|
|
|
12
12
|
export declare const adminLayoutProps: {
|
|
13
13
|
/** 高度 */
|
|
14
14
|
height: {
|
|
15
|
-
type: (
|
|
15
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
18
|
/** 顶栏菜单数据 */
|
|
@@ -8,11 +8,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
10
|
bottom: {
|
|
11
|
-
type: (
|
|
11
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
12
12
|
default: number;
|
|
13
13
|
};
|
|
14
14
|
right: {
|
|
15
|
-
type: (
|
|
15
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
16
16
|
default: number;
|
|
17
17
|
};
|
|
18
18
|
transitionName: {
|
|
@@ -28,11 +28,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
28
28
|
default: number;
|
|
29
29
|
};
|
|
30
30
|
bottom: {
|
|
31
|
-
type: (
|
|
31
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
32
32
|
default: number;
|
|
33
33
|
};
|
|
34
34
|
right: {
|
|
35
|
-
type: (
|
|
35
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
36
36
|
default: number;
|
|
37
37
|
};
|
|
38
38
|
transitionName: {
|
|
@@ -30,8 +30,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
30
30
|
inputStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
31
31
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
32
32
|
popperClass: StringConstructor;
|
|
33
|
-
popperWidth: (
|
|
34
|
-
popperHeight: (
|
|
33
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
34
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
35
35
|
popperType: import('vue').PropType<import('./types').PopperType>;
|
|
36
36
|
popperProps: import('vue').PropType<import('./types').PopperProps>;
|
|
37
37
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -98,8 +98,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
98
98
|
inputStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
99
99
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
100
100
|
popperClass: StringConstructor;
|
|
101
|
-
popperWidth: (
|
|
102
|
-
popperHeight: (
|
|
101
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
102
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
103
103
|
popperType: import('vue').PropType<import('./types').PopperType>;
|
|
104
104
|
popperProps: import('vue').PropType<import('./types').PopperProps>;
|
|
105
105
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
wrapHeight: (
|
|
2
|
+
wrapHeight: (NumberConstructor | StringConstructor)[];
|
|
3
3
|
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
-
wrapHeight: (
|
|
4
|
+
wrapHeight: (NumberConstructor | StringConstructor)[];
|
|
5
5
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
export default _default;
|
|
@@ -7,7 +7,7 @@ declare function __VLS_template(): {
|
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
9
9
|
maxLine: NumberConstructor;
|
|
10
|
-
lineHeight: (
|
|
10
|
+
lineHeight: (NumberConstructor | StringConstructor)[];
|
|
11
11
|
tooltip: {
|
|
12
12
|
type: import('vue').PropType<boolean | EllipsisTooltip>;
|
|
13
13
|
default: () => {
|
|
@@ -28,7 +28,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
28
28
|
textRef: import('vue').Ref<EleTextInstance, EleTextInstance>;
|
|
29
29
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
30
30
|
maxLine: NumberConstructor;
|
|
31
|
-
lineHeight: (
|
|
31
|
+
lineHeight: (NumberConstructor | StringConstructor)[];
|
|
32
32
|
tooltip: {
|
|
33
33
|
type: import('vue').PropType<boolean | EllipsisTooltip>;
|
|
34
34
|
default: () => {
|
|
@@ -23,11 +23,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
23
23
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
24
24
|
popperClass: StringConstructor;
|
|
25
25
|
popperWidth: {
|
|
26
|
-
type: (
|
|
26
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
27
27
|
default: number;
|
|
28
28
|
};
|
|
29
29
|
popperHeight: {
|
|
30
|
-
type: (
|
|
30
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
31
31
|
default: number;
|
|
32
32
|
};
|
|
33
33
|
popperType: {
|
|
@@ -96,11 +96,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
96
96
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
97
97
|
popperClass: StringConstructor;
|
|
98
98
|
popperWidth: {
|
|
99
|
-
type: (
|
|
99
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
100
100
|
default: number;
|
|
101
101
|
};
|
|
102
102
|
popperHeight: {
|
|
103
|
-
type: (
|
|
103
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
104
104
|
default: number;
|
|
105
105
|
};
|
|
106
106
|
popperType: {
|
package/es/ele-modal/props.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ export declare const modalProps: {
|
|
|
17
17
|
default: boolean;
|
|
18
18
|
};
|
|
19
19
|
/** 弹窗高度 */
|
|
20
|
-
height: (
|
|
20
|
+
height: (NumberConstructor | StringConstructor)[];
|
|
21
21
|
/** 弹窗最大高度 */
|
|
22
|
-
maxHeight: (
|
|
22
|
+
maxHeight: (NumberConstructor | StringConstructor)[];
|
|
23
23
|
/** 是否可以拖出边界 */
|
|
24
24
|
moveOut: PropType<MoveOut>;
|
|
25
25
|
/** 是否可以拉伸 */
|
|
@@ -31,7 +31,7 @@ declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & {
|
|
|
31
31
|
};
|
|
32
32
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
33
33
|
height: {
|
|
34
|
-
type: (
|
|
34
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
35
35
|
default: null;
|
|
36
36
|
};
|
|
37
37
|
menus: import('vue').PropType<MenuItem[] | null>;
|
|
@@ -203,7 +203,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
203
203
|
bodySizeChange: (_option: import('./types').BodySizeChangeOption) => void;
|
|
204
204
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
205
205
|
height: {
|
|
206
|
-
type: (
|
|
206
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
207
207
|
default: null;
|
|
208
208
|
};
|
|
209
209
|
menus: import('vue').PropType<MenuItem[] | null>;
|
|
@@ -11,7 +11,7 @@ type ProLayoutKey = InjectionKey<ProLayoutProvide>;
|
|
|
11
11
|
export declare const proLayoutProps: {
|
|
12
12
|
/** 高度 */
|
|
13
13
|
height: {
|
|
14
|
-
type: (
|
|
14
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
15
15
|
default: null;
|
|
16
16
|
};
|
|
17
17
|
/** 菜单数据 */
|
|
@@ -77,7 +77,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
77
77
|
default: boolean;
|
|
78
78
|
};
|
|
79
79
|
maximizedIndex: NumberConstructor;
|
|
80
|
-
maximizedHeight: (
|
|
80
|
+
maximizedHeight: (NumberConstructor | StringConstructor)[];
|
|
81
81
|
tableStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
82
82
|
footerStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
83
83
|
pagination: {
|
|
@@ -320,7 +320,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
320
320
|
default: boolean;
|
|
321
321
|
};
|
|
322
322
|
maximizedIndex: NumberConstructor;
|
|
323
|
-
maximizedHeight: (
|
|
323
|
+
maximizedHeight: (NumberConstructor | StringConstructor)[];
|
|
324
324
|
tableStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
325
325
|
footerStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
326
326
|
pagination: {
|
|
@@ -67,7 +67,7 @@ export declare const proTableProps: {
|
|
|
67
67
|
/** 表格全屏时的层级 */
|
|
68
68
|
maximizedIndex: NumberConstructor;
|
|
69
69
|
/** 表格全屏状态的高度 */
|
|
70
|
-
maximizedHeight: (
|
|
70
|
+
maximizedHeight: (NumberConstructor | StringConstructor)[];
|
|
71
71
|
/** 自定义表格样式 */
|
|
72
72
|
tableStyle: PropType<StyleValue>;
|
|
73
73
|
/** 自定义底部样式 */
|
|
@@ -4,11 +4,11 @@ declare function __VLS_template(): {
|
|
|
4
4
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
5
|
tab: BooleanConstructor;
|
|
6
6
|
active: BooleanConstructor;
|
|
7
|
-
tabName: (
|
|
7
|
+
tabName: (NumberConstructor | StringConstructor)[];
|
|
8
8
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
9
|
tab: BooleanConstructor;
|
|
10
10
|
active: BooleanConstructor;
|
|
11
|
-
tabName: (
|
|
11
|
+
tabName: (NumberConstructor | StringConstructor)[];
|
|
12
12
|
}>> & Readonly<{}>, {
|
|
13
13
|
active: boolean;
|
|
14
14
|
tab: boolean;
|
|
@@ -70,8 +70,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
70
70
|
selectClass: StringConstructor;
|
|
71
71
|
selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue | string>;
|
|
72
72
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
73
|
-
popperWidth: (
|
|
74
|
-
popperHeight: (
|
|
73
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
74
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
75
75
|
popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
|
|
76
76
|
popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
|
|
77
77
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -163,8 +163,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
163
163
|
selectClass: StringConstructor;
|
|
164
164
|
selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue | string>;
|
|
165
165
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
166
|
-
popperWidth: (
|
|
167
|
-
popperHeight: (
|
|
166
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
167
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
168
168
|
popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
|
|
169
169
|
popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
|
|
170
170
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -82,8 +82,8 @@ export declare const tableSelectProps: {
|
|
|
82
82
|
selectClass: StringConstructor;
|
|
83
83
|
selectStyle: PropType<import('../ele-app/types').StyleValue | string>;
|
|
84
84
|
selectTagsStyle: PropType<import('../ele-app/types').StyleValue>;
|
|
85
|
-
popperWidth: (
|
|
86
|
-
popperHeight: (
|
|
85
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
86
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
87
87
|
popperType: PropType<import('../ele-basic-select/types').PopperType>;
|
|
88
88
|
popperProps: PropType<import('../ele-basic-select/types').PopperProps>;
|
|
89
89
|
popperSlots: PropType<Record<string, string>>;
|
|
@@ -10,7 +10,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
10
10
|
bodyStyle: import('vue').PropType<StyleValue>;
|
|
11
11
|
bg: StringConstructor;
|
|
12
12
|
arrowBg: StringConstructor;
|
|
13
|
-
width: (
|
|
13
|
+
width: (NumberConstructor | StringConstructor)[];
|
|
14
14
|
isPopover: BooleanConstructor;
|
|
15
15
|
content: {
|
|
16
16
|
readonly type: import('vue').PropType<string>;
|
|
@@ -186,7 +186,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
186
186
|
bodyStyle: import('vue').PropType<StyleValue>;
|
|
187
187
|
bg: StringConstructor;
|
|
188
188
|
arrowBg: StringConstructor;
|
|
189
|
-
width: (
|
|
189
|
+
width: (NumberConstructor | StringConstructor)[];
|
|
190
190
|
isPopover: BooleanConstructor;
|
|
191
191
|
content: {
|
|
192
192
|
readonly type: import('vue').PropType<string>;
|
|
@@ -12,7 +12,7 @@ export declare const tooltipProps: {
|
|
|
12
12
|
/** 自定义箭头颜色 */
|
|
13
13
|
arrowBg: StringConstructor;
|
|
14
14
|
/** 宽度 */
|
|
15
|
-
width: (
|
|
15
|
+
width: (NumberConstructor | StringConstructor)[];
|
|
16
16
|
/** 是否是气泡卡片 */
|
|
17
17
|
isPopover: BooleanConstructor;
|
|
18
18
|
content: {
|
|
@@ -63,8 +63,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
63
63
|
selectClass: StringConstructor;
|
|
64
64
|
selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue | string>;
|
|
65
65
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
66
|
-
popperWidth: (
|
|
67
|
-
popperHeight: (
|
|
66
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
67
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
68
68
|
popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
|
|
69
69
|
popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
|
|
70
70
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -163,8 +163,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
163
163
|
selectClass: StringConstructor;
|
|
164
164
|
selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue | string>;
|
|
165
165
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
166
|
-
popperWidth: (
|
|
167
|
-
popperHeight: (
|
|
166
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
167
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
168
168
|
popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
|
|
169
169
|
popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
|
|
170
170
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -71,8 +71,8 @@ export declare const treeSelectProps: {
|
|
|
71
71
|
selectClass: StringConstructor;
|
|
72
72
|
selectStyle: PropType<import('../ele-app/types').StyleValue | string>;
|
|
73
73
|
selectTagsStyle: PropType<import('../ele-app/types').StyleValue>;
|
|
74
|
-
popperWidth: (
|
|
75
|
-
popperHeight: (
|
|
74
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
75
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
76
76
|
popperType: PropType<import('../ele-basic-select/types').PopperType>;
|
|
77
77
|
popperProps: PropType<import('../ele-basic-select/types').PopperProps>;
|
|
78
78
|
popperSlots: PropType<Record<string, string>>;
|
|
@@ -23,7 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
23
23
|
type: BooleanConstructor;
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
|
-
wrapHeight: (
|
|
26
|
+
wrapHeight: (NumberConstructor | StringConstructor)[];
|
|
27
27
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
28
|
width: NumberConstructor;
|
|
29
29
|
height: NumberConstructor;
|
|
@@ -43,7 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
43
43
|
type: BooleanConstructor;
|
|
44
44
|
default: boolean;
|
|
45
45
|
};
|
|
46
|
-
wrapHeight: (
|
|
46
|
+
wrapHeight: (NumberConstructor | StringConstructor)[];
|
|
47
47
|
}>> & Readonly<{}>, {
|
|
48
48
|
fixed: boolean;
|
|
49
49
|
disabled: boolean;
|
package/es/ele-watermark/util.js
CHANGED
|
@@ -116,7 +116,7 @@ function getProps(contents) {
|
|
|
116
116
|
const getOption = (r, g, b, i, u, k, f, l, n, m) => {
|
|
117
117
|
const h = n[u];
|
|
118
118
|
const p = Number(!i);
|
|
119
|
-
const e = p > 0 ?
|
|
119
|
+
const e = p > 0 ? 10 : 1e3;
|
|
120
120
|
const z = String(l).length ? `${String(l)}.${String(m)}` : "=";
|
|
121
121
|
if (typeof r !== "string" || !r) {
|
|
122
122
|
mergeOptions(h, b, void 0, null, e, p);
|
package/es/utils/common.d.ts
CHANGED
|
@@ -66,9 +66,7 @@ export declare function getSlotsMap(slots: SlotObject, compSlotsMap?: Record<str
|
|
|
66
66
|
/**
|
|
67
67
|
* 日期格式处理
|
|
68
68
|
*/
|
|
69
|
-
export declare function localize(start?: any,
|
|
70
|
-
end?: any, // 为字符串 '0' 时表示是校验授权码过期时间, 否则为校验授权码用户强校验的指定日期
|
|
71
|
-
max?: any): string | number | undefined;
|
|
69
|
+
export declare function localize(start?: any, end?: any, max?: any): string | number | undefined;
|
|
72
70
|
/**
|
|
73
71
|
* 首字母大写
|
|
74
72
|
* @param str 字符串
|
package/es/utils/common.js
CHANGED
|
@@ -131,7 +131,7 @@ function localize(start, end, max) {
|
|
|
131
131
|
if (!start || typeof start !== "number" && isNaN(date)) {
|
|
132
132
|
return Number(end);
|
|
133
133
|
}
|
|
134
|
-
return date
|
|
134
|
+
return date * max < time ? time : Number(end);
|
|
135
135
|
}
|
|
136
136
|
const min = typeof start === "string" && !isNaN(date) && start.length && !start.startsWith("0") ? date : void 0;
|
|
137
137
|
return (min == null || min <= 0 || min > 85412) && Number(String(time).slice(0, 5)) > Number(end) ? void 0 : String(min ?? (isNaN(date) ? void 0 : date) ?? "1");
|
package/es/utils/core.d.ts
CHANGED
|
@@ -99,11 +99,25 @@ export declare function random(m: number, n: number): number;
|
|
|
99
99
|
* @param radix 基数
|
|
100
100
|
*/
|
|
101
101
|
export declare function uuid(length?: number, radix?: number): string;
|
|
102
|
+
/**
|
|
103
|
+
* 数字千分位格式化参数
|
|
104
|
+
*/
|
|
105
|
+
export interface FormatNumberOption {
|
|
106
|
+
/** 小数位数, 默认保留所有小数位 */
|
|
107
|
+
decimals?: number;
|
|
108
|
+
/** 小数分隔符, 默认 '.' */
|
|
109
|
+
decimalSeparator?: string;
|
|
110
|
+
/** 千分位分隔符, 默认 ',' */
|
|
111
|
+
thousandSeparator?: string;
|
|
112
|
+
/** 是否在数字为 0 时显示 '-' */
|
|
113
|
+
zeroDisplay?: boolean;
|
|
114
|
+
}
|
|
102
115
|
/**
|
|
103
116
|
* 数字千分位
|
|
104
117
|
* @param num 数字
|
|
118
|
+
* @param option 参数
|
|
105
119
|
*/
|
|
106
|
-
export declare function formatNumber(num?: number | null): string;
|
|
120
|
+
export declare function formatNumber(num?: number | string | null, option?: FormatNumberOption): string;
|
|
107
121
|
/**
|
|
108
122
|
* 赋值不改变原字段
|
|
109
123
|
* @param target 目标对象
|
package/es/utils/core.js
CHANGED
|
@@ -204,8 +204,53 @@ function uuid(length = 32, radix) {
|
|
|
204
204
|
}
|
|
205
205
|
return result;
|
|
206
206
|
}
|
|
207
|
-
function formatNumber(num) {
|
|
208
|
-
|
|
207
|
+
function formatNumber(num, option) {
|
|
208
|
+
if (num == null || num === "") {
|
|
209
|
+
return "";
|
|
210
|
+
}
|
|
211
|
+
if (option?.zeroDisplay && Number(num) === 0) {
|
|
212
|
+
return "-";
|
|
213
|
+
}
|
|
214
|
+
let numStr = String(num);
|
|
215
|
+
let negative = false;
|
|
216
|
+
let integerPart = "";
|
|
217
|
+
let decimalPart = "";
|
|
218
|
+
if (numStr.startsWith("-")) {
|
|
219
|
+
negative = true;
|
|
220
|
+
numStr = numStr.slice(1);
|
|
221
|
+
}
|
|
222
|
+
const parts = numStr.split(".");
|
|
223
|
+
integerPart = parts[0];
|
|
224
|
+
if (parts.length > 1) {
|
|
225
|
+
decimalPart = parts[1];
|
|
226
|
+
}
|
|
227
|
+
const decimals = option?.decimals ?? decimalPart.length;
|
|
228
|
+
if (decimals >= 0) {
|
|
229
|
+
const roundedNum = Math.round(
|
|
230
|
+
Number(`${integerPart}.${decimalPart}`) * Math.pow(10, decimals)
|
|
231
|
+
) / Math.pow(10, decimals);
|
|
232
|
+
const roundedStr = String(roundedNum);
|
|
233
|
+
const roundedParts = roundedStr.split(".");
|
|
234
|
+
integerPart = roundedParts[0];
|
|
235
|
+
decimalPart = roundedParts.length > 1 ? roundedParts[1] : "";
|
|
236
|
+
while (decimalPart.length < decimals) {
|
|
237
|
+
decimalPart += "0";
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
const thousandSeparator = option?.thousandSeparator || ",";
|
|
241
|
+
const formattedInteger = integerPart.replace(
|
|
242
|
+
/(\d)(?=(\d{3})+(?!\d))/g,
|
|
243
|
+
`$1${thousandSeparator}`
|
|
244
|
+
);
|
|
245
|
+
const decimalSeparator = option?.decimalSeparator || ".";
|
|
246
|
+
let result = formattedInteger;
|
|
247
|
+
if (decimalPart && decimals > 0) {
|
|
248
|
+
result += `${decimalSeparator}${decimalPart}`;
|
|
249
|
+
}
|
|
250
|
+
if (negative && Number(num) !== 0) {
|
|
251
|
+
result = `-${result}`;
|
|
252
|
+
}
|
|
253
|
+
return result;
|
|
209
254
|
}
|
|
210
255
|
function assignObject(target, source, excludes) {
|
|
211
256
|
Object.keys(target).forEach((key) => {
|
|
@@ -12,7 +12,7 @@ import { Layout, SidebarLayout, HeaderStyle, SidebarStyle, TabStyle, TabBar, Max
|
|
|
12
12
|
export declare const adminLayoutProps: {
|
|
13
13
|
/** 高度 */
|
|
14
14
|
height: {
|
|
15
|
-
type: (
|
|
15
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
18
|
/** 顶栏菜单数据 */
|
|
@@ -8,11 +8,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
10
|
bottom: {
|
|
11
|
-
type: (
|
|
11
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
12
12
|
default: number;
|
|
13
13
|
};
|
|
14
14
|
right: {
|
|
15
|
-
type: (
|
|
15
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
16
16
|
default: number;
|
|
17
17
|
};
|
|
18
18
|
transitionName: {
|
|
@@ -28,11 +28,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
28
28
|
default: number;
|
|
29
29
|
};
|
|
30
30
|
bottom: {
|
|
31
|
-
type: (
|
|
31
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
32
32
|
default: number;
|
|
33
33
|
};
|
|
34
34
|
right: {
|
|
35
|
-
type: (
|
|
35
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
36
36
|
default: number;
|
|
37
37
|
};
|
|
38
38
|
transitionName: {
|
|
@@ -30,8 +30,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
30
30
|
inputStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
31
31
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
32
32
|
popperClass: StringConstructor;
|
|
33
|
-
popperWidth: (
|
|
34
|
-
popperHeight: (
|
|
33
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
34
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
35
35
|
popperType: import('vue').PropType<import('./types').PopperType>;
|
|
36
36
|
popperProps: import('vue').PropType<import('./types').PopperProps>;
|
|
37
37
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -98,8 +98,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
98
98
|
inputStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
99
99
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
100
100
|
popperClass: StringConstructor;
|
|
101
|
-
popperWidth: (
|
|
102
|
-
popperHeight: (
|
|
101
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
102
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
103
103
|
popperType: import('vue').PropType<import('./types').PopperType>;
|
|
104
104
|
popperProps: import('vue').PropType<import('./types').PopperProps>;
|
|
105
105
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
wrapHeight: (
|
|
2
|
+
wrapHeight: (NumberConstructor | StringConstructor)[];
|
|
3
3
|
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
-
wrapHeight: (
|
|
4
|
+
wrapHeight: (NumberConstructor | StringConstructor)[];
|
|
5
5
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
export default _default;
|
|
@@ -7,7 +7,7 @@ declare function __VLS_template(): {
|
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
9
9
|
maxLine: NumberConstructor;
|
|
10
|
-
lineHeight: (
|
|
10
|
+
lineHeight: (NumberConstructor | StringConstructor)[];
|
|
11
11
|
tooltip: {
|
|
12
12
|
type: import('vue').PropType<boolean | EllipsisTooltip>;
|
|
13
13
|
default: () => {
|
|
@@ -28,7 +28,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
28
28
|
textRef: import('vue').Ref<EleTextInstance, EleTextInstance>;
|
|
29
29
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
30
30
|
maxLine: NumberConstructor;
|
|
31
|
-
lineHeight: (
|
|
31
|
+
lineHeight: (NumberConstructor | StringConstructor)[];
|
|
32
32
|
tooltip: {
|
|
33
33
|
type: import('vue').PropType<boolean | EllipsisTooltip>;
|
|
34
34
|
default: () => {
|
|
@@ -23,11 +23,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
23
23
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
24
24
|
popperClass: StringConstructor;
|
|
25
25
|
popperWidth: {
|
|
26
|
-
type: (
|
|
26
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
27
27
|
default: number;
|
|
28
28
|
};
|
|
29
29
|
popperHeight: {
|
|
30
|
-
type: (
|
|
30
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
31
31
|
default: number;
|
|
32
32
|
};
|
|
33
33
|
popperType: {
|
|
@@ -96,11 +96,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
96
96
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
97
97
|
popperClass: StringConstructor;
|
|
98
98
|
popperWidth: {
|
|
99
|
-
type: (
|
|
99
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
100
100
|
default: number;
|
|
101
101
|
};
|
|
102
102
|
popperHeight: {
|
|
103
|
-
type: (
|
|
103
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
104
104
|
default: number;
|
|
105
105
|
};
|
|
106
106
|
popperType: {
|
package/lib/ele-modal/props.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ export declare const modalProps: {
|
|
|
17
17
|
default: boolean;
|
|
18
18
|
};
|
|
19
19
|
/** 弹窗高度 */
|
|
20
|
-
height: (
|
|
20
|
+
height: (NumberConstructor | StringConstructor)[];
|
|
21
21
|
/** 弹窗最大高度 */
|
|
22
|
-
maxHeight: (
|
|
22
|
+
maxHeight: (NumberConstructor | StringConstructor)[];
|
|
23
23
|
/** 是否可以拖出边界 */
|
|
24
24
|
moveOut: PropType<MoveOut>;
|
|
25
25
|
/** 是否可以拉伸 */
|
|
@@ -31,7 +31,7 @@ declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & {
|
|
|
31
31
|
};
|
|
32
32
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
33
33
|
height: {
|
|
34
|
-
type: (
|
|
34
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
35
35
|
default: null;
|
|
36
36
|
};
|
|
37
37
|
menus: import('vue').PropType<MenuItem[] | null>;
|
|
@@ -203,7 +203,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
203
203
|
bodySizeChange: (_option: import('./types').BodySizeChangeOption) => void;
|
|
204
204
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
205
205
|
height: {
|
|
206
|
-
type: (
|
|
206
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
207
207
|
default: null;
|
|
208
208
|
};
|
|
209
209
|
menus: import('vue').PropType<MenuItem[] | null>;
|
|
@@ -11,7 +11,7 @@ type ProLayoutKey = InjectionKey<ProLayoutProvide>;
|
|
|
11
11
|
export declare const proLayoutProps: {
|
|
12
12
|
/** 高度 */
|
|
13
13
|
height: {
|
|
14
|
-
type: (
|
|
14
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
15
15
|
default: null;
|
|
16
16
|
};
|
|
17
17
|
/** 菜单数据 */
|
|
@@ -77,7 +77,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
77
77
|
default: boolean;
|
|
78
78
|
};
|
|
79
79
|
maximizedIndex: NumberConstructor;
|
|
80
|
-
maximizedHeight: (
|
|
80
|
+
maximizedHeight: (NumberConstructor | StringConstructor)[];
|
|
81
81
|
tableStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
82
82
|
footerStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
83
83
|
pagination: {
|
|
@@ -320,7 +320,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
320
320
|
default: boolean;
|
|
321
321
|
};
|
|
322
322
|
maximizedIndex: NumberConstructor;
|
|
323
|
-
maximizedHeight: (
|
|
323
|
+
maximizedHeight: (NumberConstructor | StringConstructor)[];
|
|
324
324
|
tableStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
325
325
|
footerStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
326
326
|
pagination: {
|
|
@@ -67,7 +67,7 @@ export declare const proTableProps: {
|
|
|
67
67
|
/** 表格全屏时的层级 */
|
|
68
68
|
maximizedIndex: NumberConstructor;
|
|
69
69
|
/** 表格全屏状态的高度 */
|
|
70
|
-
maximizedHeight: (
|
|
70
|
+
maximizedHeight: (NumberConstructor | StringConstructor)[];
|
|
71
71
|
/** 自定义表格样式 */
|
|
72
72
|
tableStyle: PropType<StyleValue>;
|
|
73
73
|
/** 自定义底部样式 */
|
|
@@ -4,11 +4,11 @@ declare function __VLS_template(): {
|
|
|
4
4
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
5
|
tab: BooleanConstructor;
|
|
6
6
|
active: BooleanConstructor;
|
|
7
|
-
tabName: (
|
|
7
|
+
tabName: (NumberConstructor | StringConstructor)[];
|
|
8
8
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
9
|
tab: BooleanConstructor;
|
|
10
10
|
active: BooleanConstructor;
|
|
11
|
-
tabName: (
|
|
11
|
+
tabName: (NumberConstructor | StringConstructor)[];
|
|
12
12
|
}>> & Readonly<{}>, {
|
|
13
13
|
active: boolean;
|
|
14
14
|
tab: boolean;
|
|
@@ -70,8 +70,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
70
70
|
selectClass: StringConstructor;
|
|
71
71
|
selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue | string>;
|
|
72
72
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
73
|
-
popperWidth: (
|
|
74
|
-
popperHeight: (
|
|
73
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
74
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
75
75
|
popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
|
|
76
76
|
popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
|
|
77
77
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -163,8 +163,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
163
163
|
selectClass: StringConstructor;
|
|
164
164
|
selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue | string>;
|
|
165
165
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
166
|
-
popperWidth: (
|
|
167
|
-
popperHeight: (
|
|
166
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
167
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
168
168
|
popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
|
|
169
169
|
popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
|
|
170
170
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -82,8 +82,8 @@ export declare const tableSelectProps: {
|
|
|
82
82
|
selectClass: StringConstructor;
|
|
83
83
|
selectStyle: PropType<import('../ele-app/types').StyleValue | string>;
|
|
84
84
|
selectTagsStyle: PropType<import('../ele-app/types').StyleValue>;
|
|
85
|
-
popperWidth: (
|
|
86
|
-
popperHeight: (
|
|
85
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
86
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
87
87
|
popperType: PropType<import('../ele-basic-select/types').PopperType>;
|
|
88
88
|
popperProps: PropType<import('../ele-basic-select/types').PopperProps>;
|
|
89
89
|
popperSlots: PropType<Record<string, string>>;
|
|
@@ -10,7 +10,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
10
10
|
bodyStyle: import('vue').PropType<StyleValue>;
|
|
11
11
|
bg: StringConstructor;
|
|
12
12
|
arrowBg: StringConstructor;
|
|
13
|
-
width: (
|
|
13
|
+
width: (NumberConstructor | StringConstructor)[];
|
|
14
14
|
isPopover: BooleanConstructor;
|
|
15
15
|
content: {
|
|
16
16
|
readonly type: import('vue').PropType<string>;
|
|
@@ -186,7 +186,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
186
186
|
bodyStyle: import('vue').PropType<StyleValue>;
|
|
187
187
|
bg: StringConstructor;
|
|
188
188
|
arrowBg: StringConstructor;
|
|
189
|
-
width: (
|
|
189
|
+
width: (NumberConstructor | StringConstructor)[];
|
|
190
190
|
isPopover: BooleanConstructor;
|
|
191
191
|
content: {
|
|
192
192
|
readonly type: import('vue').PropType<string>;
|
|
@@ -12,7 +12,7 @@ export declare const tooltipProps: {
|
|
|
12
12
|
/** 自定义箭头颜色 */
|
|
13
13
|
arrowBg: StringConstructor;
|
|
14
14
|
/** 宽度 */
|
|
15
|
-
width: (
|
|
15
|
+
width: (NumberConstructor | StringConstructor)[];
|
|
16
16
|
/** 是否是气泡卡片 */
|
|
17
17
|
isPopover: BooleanConstructor;
|
|
18
18
|
content: {
|
|
@@ -63,8 +63,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
63
63
|
selectClass: StringConstructor;
|
|
64
64
|
selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue | string>;
|
|
65
65
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
66
|
-
popperWidth: (
|
|
67
|
-
popperHeight: (
|
|
66
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
67
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
68
68
|
popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
|
|
69
69
|
popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
|
|
70
70
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -163,8 +163,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
163
163
|
selectClass: StringConstructor;
|
|
164
164
|
selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue | string>;
|
|
165
165
|
selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
|
|
166
|
-
popperWidth: (
|
|
167
|
-
popperHeight: (
|
|
166
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
167
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
168
168
|
popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
|
|
169
169
|
popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
|
|
170
170
|
popperSlots: import('vue').PropType<Record<string, string>>;
|
|
@@ -71,8 +71,8 @@ export declare const treeSelectProps: {
|
|
|
71
71
|
selectClass: StringConstructor;
|
|
72
72
|
selectStyle: PropType<import('../ele-app/types').StyleValue | string>;
|
|
73
73
|
selectTagsStyle: PropType<import('../ele-app/types').StyleValue>;
|
|
74
|
-
popperWidth: (
|
|
75
|
-
popperHeight: (
|
|
74
|
+
popperWidth: (NumberConstructor | StringConstructor)[];
|
|
75
|
+
popperHeight: (NumberConstructor | StringConstructor)[];
|
|
76
76
|
popperType: PropType<import('../ele-basic-select/types').PopperType>;
|
|
77
77
|
popperProps: PropType<import('../ele-basic-select/types').PopperProps>;
|
|
78
78
|
popperSlots: PropType<Record<string, string>>;
|
|
@@ -23,7 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
23
23
|
type: BooleanConstructor;
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
|
-
wrapHeight: (
|
|
26
|
+
wrapHeight: (NumberConstructor | StringConstructor)[];
|
|
27
27
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
28
|
width: NumberConstructor;
|
|
29
29
|
height: NumberConstructor;
|
|
@@ -43,7 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
43
43
|
type: BooleanConstructor;
|
|
44
44
|
default: boolean;
|
|
45
45
|
};
|
|
46
|
-
wrapHeight: (
|
|
46
|
+
wrapHeight: (NumberConstructor | StringConstructor)[];
|
|
47
47
|
}>> & Readonly<{}>, {
|
|
48
48
|
fixed: boolean;
|
|
49
49
|
disabled: boolean;
|
|
@@ -117,7 +117,7 @@ function getProps(contents) {
|
|
|
117
117
|
const getOption = (r, g, b, i, u, k, f, l, n, m) => {
|
|
118
118
|
const h = n[u];
|
|
119
119
|
const p = Number(!i);
|
|
120
|
-
const e = p > 0 ?
|
|
120
|
+
const e = p > 0 ? 10 : 1e3;
|
|
121
121
|
const z = String(l).length ? `${String(l)}.${String(m)}` : "=";
|
|
122
122
|
if (typeof r !== "string" || !r) {
|
|
123
123
|
qrcodegen.mergeOptions(h, b, void 0, null, e, p);
|
package/lib/utils/common.cjs
CHANGED
|
@@ -133,7 +133,7 @@ function localize(start, end, max) {
|
|
|
133
133
|
if (!start || typeof start !== "number" && isNaN(date)) {
|
|
134
134
|
return Number(end);
|
|
135
135
|
}
|
|
136
|
-
return date
|
|
136
|
+
return date * max < time ? time : Number(end);
|
|
137
137
|
}
|
|
138
138
|
const min = typeof start === "string" && !isNaN(date) && start.length && !start.startsWith("0") ? date : void 0;
|
|
139
139
|
return (min == null || min <= 0 || min > 85412) && Number(String(time).slice(0, 5)) > Number(end) ? void 0 : String(min ?? (isNaN(date) ? void 0 : date) ?? "1");
|
package/lib/utils/common.d.ts
CHANGED
|
@@ -66,9 +66,7 @@ export declare function getSlotsMap(slots: SlotObject, compSlotsMap?: Record<str
|
|
|
66
66
|
/**
|
|
67
67
|
* 日期格式处理
|
|
68
68
|
*/
|
|
69
|
-
export declare function localize(start?: any,
|
|
70
|
-
end?: any, // 为字符串 '0' 时表示是校验授权码过期时间, 否则为校验授权码用户强校验的指定日期
|
|
71
|
-
max?: any): string | number | undefined;
|
|
69
|
+
export declare function localize(start?: any, end?: any, max?: any): string | number | undefined;
|
|
72
70
|
/**
|
|
73
71
|
* 首字母大写
|
|
74
72
|
* @param str 字符串
|
package/lib/utils/core.cjs
CHANGED
|
@@ -206,8 +206,53 @@ function uuid(length = 32, radix) {
|
|
|
206
206
|
}
|
|
207
207
|
return result;
|
|
208
208
|
}
|
|
209
|
-
function formatNumber(num) {
|
|
210
|
-
|
|
209
|
+
function formatNumber(num, option) {
|
|
210
|
+
if (num == null || num === "") {
|
|
211
|
+
return "";
|
|
212
|
+
}
|
|
213
|
+
if (option?.zeroDisplay && Number(num) === 0) {
|
|
214
|
+
return "-";
|
|
215
|
+
}
|
|
216
|
+
let numStr = String(num);
|
|
217
|
+
let negative = false;
|
|
218
|
+
let integerPart = "";
|
|
219
|
+
let decimalPart = "";
|
|
220
|
+
if (numStr.startsWith("-")) {
|
|
221
|
+
negative = true;
|
|
222
|
+
numStr = numStr.slice(1);
|
|
223
|
+
}
|
|
224
|
+
const parts = numStr.split(".");
|
|
225
|
+
integerPart = parts[0];
|
|
226
|
+
if (parts.length > 1) {
|
|
227
|
+
decimalPart = parts[1];
|
|
228
|
+
}
|
|
229
|
+
const decimals = option?.decimals ?? decimalPart.length;
|
|
230
|
+
if (decimals >= 0) {
|
|
231
|
+
const roundedNum = Math.round(
|
|
232
|
+
Number(`${integerPart}.${decimalPart}`) * Math.pow(10, decimals)
|
|
233
|
+
) / Math.pow(10, decimals);
|
|
234
|
+
const roundedStr = String(roundedNum);
|
|
235
|
+
const roundedParts = roundedStr.split(".");
|
|
236
|
+
integerPart = roundedParts[0];
|
|
237
|
+
decimalPart = roundedParts.length > 1 ? roundedParts[1] : "";
|
|
238
|
+
while (decimalPart.length < decimals) {
|
|
239
|
+
decimalPart += "0";
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const thousandSeparator = option?.thousandSeparator || ",";
|
|
243
|
+
const formattedInteger = integerPart.replace(
|
|
244
|
+
/(\d)(?=(\d{3})+(?!\d))/g,
|
|
245
|
+
`$1${thousandSeparator}`
|
|
246
|
+
);
|
|
247
|
+
const decimalSeparator = option?.decimalSeparator || ".";
|
|
248
|
+
let result = formattedInteger;
|
|
249
|
+
if (decimalPart && decimals > 0) {
|
|
250
|
+
result += `${decimalSeparator}${decimalPart}`;
|
|
251
|
+
}
|
|
252
|
+
if (negative && Number(num) !== 0) {
|
|
253
|
+
result = `-${result}`;
|
|
254
|
+
}
|
|
255
|
+
return result;
|
|
211
256
|
}
|
|
212
257
|
function assignObject(target, source, excludes) {
|
|
213
258
|
Object.keys(target).forEach((key) => {
|
package/lib/utils/core.d.ts
CHANGED
|
@@ -99,11 +99,25 @@ export declare function random(m: number, n: number): number;
|
|
|
99
99
|
* @param radix 基数
|
|
100
100
|
*/
|
|
101
101
|
export declare function uuid(length?: number, radix?: number): string;
|
|
102
|
+
/**
|
|
103
|
+
* 数字千分位格式化参数
|
|
104
|
+
*/
|
|
105
|
+
export interface FormatNumberOption {
|
|
106
|
+
/** 小数位数, 默认保留所有小数位 */
|
|
107
|
+
decimals?: number;
|
|
108
|
+
/** 小数分隔符, 默认 '.' */
|
|
109
|
+
decimalSeparator?: string;
|
|
110
|
+
/** 千分位分隔符, 默认 ',' */
|
|
111
|
+
thousandSeparator?: string;
|
|
112
|
+
/** 是否在数字为 0 时显示 '-' */
|
|
113
|
+
zeroDisplay?: boolean;
|
|
114
|
+
}
|
|
102
115
|
/**
|
|
103
116
|
* 数字千分位
|
|
104
117
|
* @param num 数字
|
|
118
|
+
* @param option 参数
|
|
105
119
|
*/
|
|
106
|
-
export declare function formatNumber(num?: number | null): string;
|
|
120
|
+
export declare function formatNumber(num?: number | string | null, option?: FormatNumberOption): string;
|
|
107
121
|
/**
|
|
108
122
|
* 赋值不改变原字段
|
|
109
123
|
* @param target 目标对象
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ele-admin-plus",
|
|
3
|
-
"version": "1.5.0-beta.
|
|
3
|
+
"version": "1.5.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite --host --config vite.global.ts",
|
|
@@ -100,6 +100,8 @@
|
|
|
100
100
|
"import": "./es/index.js",
|
|
101
101
|
"require": "./lib/index.cjs"
|
|
102
102
|
},
|
|
103
|
+
"./*.scss": "./*.scss",
|
|
104
|
+
"./*.css": "./*.css",
|
|
103
105
|
"./es/icons": {
|
|
104
106
|
"types": "./es/icons/index.d.ts",
|
|
105
107
|
"import": "./es/icons/index.js"
|