y-admin-ui 6.4.6 → 6.4.8
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/lib/utils/element/message.ts +8 -4
- package/lib/y-admin-ui.js +1393 -1388
- package/lib/y-admin-ui.js.gz +0 -0
- package/lib/y-admin-ui.umd.cjs +20 -20
- package/package.json +1 -1
|
@@ -8,17 +8,21 @@ import { ElMessage, ElLoading, type MessageOptions } from 'element-plus';
|
|
|
8
8
|
* 用于统一项目内消息提示风格
|
|
9
9
|
*/
|
|
10
10
|
type MessageType = 'primary' | 'success' | 'warning' | 'info' | 'error';
|
|
11
|
+
// 业务层(你自己用)
|
|
12
|
+
type PlacementType = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'center';
|
|
13
|
+
// Element Plus 专用
|
|
14
|
+
type ElPlacementType = Exclude<PlacementType, 'center'>;
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* MessageExtensionOptions 拓展消息提示参数
|
|
14
18
|
*/
|
|
15
19
|
export interface MessageExtensionOptions extends MessageOptions {
|
|
16
20
|
// 是否显示遮罩
|
|
17
|
-
mask
|
|
21
|
+
mask?: boolean;
|
|
18
22
|
// 是否显示边框-清新模式
|
|
19
|
-
border
|
|
23
|
+
border?: boolean;
|
|
20
24
|
// 是否loading模式
|
|
21
|
-
loading
|
|
25
|
+
loading?: boolean;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
/**
|
|
@@ -42,7 +46,7 @@ const defaultOptions: MessageExtensionOptions = {
|
|
|
42
46
|
type: 'primary' as MessageType,
|
|
43
47
|
plain: false,
|
|
44
48
|
offset: 16,
|
|
45
|
-
placement: 'top',
|
|
49
|
+
placement: 'top' as ElPlacementType,
|
|
46
50
|
zIndex: 0,
|
|
47
51
|
grouping: false,
|
|
48
52
|
repeatNum: 1,
|