@xto/feedback 1.2.1 → 1.2.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.
Files changed (40) hide show
  1. package/es/Alert/index.d.ts +16 -0
  2. package/es/Alert/index.vue.d.ts +36 -0
  3. package/es/Alert/types.d.ts +50 -0
  4. package/es/Backtop/index.d.ts +12 -0
  5. package/es/Backtop/index.vue.d.ts +33 -0
  6. package/es/Backtop/types.d.ts +33 -0
  7. package/es/Drawer/index.d.ts +24 -0
  8. package/es/Drawer/index.vue.d.ts +54 -0
  9. package/es/Drawer/types.d.ts +78 -0
  10. package/es/DrawerForm/index.d.ts +2 -0
  11. package/es/DrawerForm/index.vue.d.ts +67 -0
  12. package/es/DrawerForm/types.d.ts +48 -0
  13. package/es/Message/index.d.ts +68 -0
  14. package/es/Message/index.vue.d.ts +33 -0
  15. package/es/Message/message.d.ts +5 -0
  16. package/es/Message/types.d.ts +88 -0
  17. package/es/MessageBox/index.d.ts +9 -0
  18. package/es/MessageBox/messageBox.d.ts +5 -0
  19. package/es/MessageBox/types.d.ts +38 -0
  20. package/es/Modal/index.d.ts +38 -0
  21. package/es/Modal/index.vue.d.ts +65 -0
  22. package/es/Modal/types.d.ts +75 -0
  23. package/es/Notification/index.d.ts +10 -0
  24. package/es/Notification/notification.d.ts +5 -0
  25. package/es/Notification/types.d.ts +29 -0
  26. package/es/Popconfirm/index.d.ts +43 -0
  27. package/es/Popconfirm/index.vue.d.ts +48 -0
  28. package/es/Popconfirm/types.d.ts +94 -0
  29. package/es/Result/index.d.ts +13 -0
  30. package/es/Result/index.vue.d.ts +35 -0
  31. package/es/Timeline/TimelineItem.vue.d.ts +32 -0
  32. package/es/Timeline/index.d.ts +2 -0
  33. package/es/Timeline/index.vue.d.ts +17 -0
  34. package/es/Tooltip/index.d.ts +23 -0
  35. package/es/Tooltip/index.vue.d.ts +55 -0
  36. package/es/Tooltip/types.d.ts +81 -0
  37. package/es/index.d.ts +23 -0
  38. package/es/index.mjs +1 -1
  39. package/lib/index.cjs +1 -1
  40. package/package.json +8 -7
@@ -0,0 +1,16 @@
1
+ export interface AlertProps {
2
+ /** Alert title */
3
+ title?: string;
4
+ /** Alert description */
5
+ description?: string;
6
+ /** Alert type */
7
+ type?: 'success' | 'warning' | 'info' | 'error';
8
+ /** Whether Alert is closable */
9
+ closable?: boolean;
10
+ /** Whether to show icon */
11
+ showIcon?: boolean;
12
+ /** Whether Alert is center aligned */
13
+ center?: boolean;
14
+ /** Alert effect */
15
+ effect?: 'light' | 'dark';
16
+ }
@@ -0,0 +1,36 @@
1
+ type __VLS_Props = {
2
+ type?: 'success' | 'warning' | 'info' | 'error';
3
+ title?: string;
4
+ description?: string;
5
+ closable?: boolean;
6
+ showIcon?: boolean;
7
+ center?: boolean;
8
+ };
9
+ declare function __VLS_template(): {
10
+ attrs: Partial<{}>;
11
+ slots: {
12
+ title?(_: {}): any;
13
+ default?(_: {}): any;
14
+ };
15
+ refs: {};
16
+ rootEl: any;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ close: (event: Event) => any;
21
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onClose?: ((event: Event) => any) | undefined;
23
+ }>, {
24
+ title: string;
25
+ center: boolean;
26
+ type: "success" | "warning" | "info" | "error";
27
+ closable: boolean;
28
+ showIcon: boolean;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
31
+ export default _default;
32
+ type __VLS_WithTemplateSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Alert 组件类型定义
3
+ */
4
+ /**
5
+ * Alert 类型
6
+ */
7
+ export type AlertType = 'success' | 'warning' | 'info' | 'error';
8
+ /**
9
+ * Alert Props
10
+ */
11
+ export interface AlertProps {
12
+ /**
13
+ * Alert 类型
14
+ * @default 'info'
15
+ */
16
+ type?: AlertType;
17
+ /**
18
+ * Alert 标题
19
+ */
20
+ title?: string;
21
+ /**
22
+ * Alert 描述内容
23
+ */
24
+ description?: string;
25
+ /**
26
+ * 是否可关闭
27
+ * @default true
28
+ */
29
+ closable?: boolean;
30
+ /**
31
+ * 是否显示图标
32
+ * @default false
33
+ */
34
+ showIcon?: boolean;
35
+ /**
36
+ * 是否居中对齐
37
+ * @default false
38
+ */
39
+ center?: boolean;
40
+ }
41
+ /**
42
+ * Alert Emits
43
+ */
44
+ export interface AlertEmits {
45
+ (e: 'close', event: Event): void;
46
+ }
47
+ /**
48
+ * Alert 组件实例类型
49
+ */
50
+ export type AlertInstance = InstanceType<typeof import('./index.vue').default>;
@@ -0,0 +1,12 @@
1
+ export interface BacktopProps {
2
+ /** 滚动高度达到此参数值才显示 */
3
+ visibilityHeight?: number;
4
+ /** 距离页面右侧的距离 */
5
+ right?: number;
6
+ /** 距离页面底部的距离 */
7
+ bottom?: number;
8
+ }
9
+ export interface BacktopEmits {
10
+ click: (event: MouseEvent) => void;
11
+ }
12
+ export { default as Backtop } from './index.vue';
@@ -0,0 +1,33 @@
1
+ type __VLS_Props = {
2
+ /** 滚动高度达到此参数值才显示 */
3
+ visibilityHeight?: number;
4
+ /** 距离页面右侧的距离 */
5
+ right?: number;
6
+ /** 距离页面底部的距离 */
7
+ bottom?: number;
8
+ };
9
+ declare function __VLS_template(): {
10
+ attrs: Partial<{}>;
11
+ slots: {
12
+ default?(_: {}): any;
13
+ };
14
+ refs: {};
15
+ rootEl: any;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ click: (event: MouseEvent) => any;
20
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ onClick?: ((event: MouseEvent) => any) | undefined;
22
+ }>, {
23
+ bottom: number;
24
+ right: number;
25
+ visibilityHeight: number;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
+ export default _default;
29
+ type __VLS_WithTemplateSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Backtop 组件类型定义
3
+ */
4
+ /**
5
+ * Backtop Props
6
+ */
7
+ export interface BacktopProps {
8
+ /**
9
+ * 滚动高度达到此参数值才显示
10
+ * @default 200
11
+ */
12
+ visibilityHeight?: number;
13
+ /**
14
+ * 距离页面右侧的距离
15
+ * @default 40
16
+ */
17
+ right?: number;
18
+ /**
19
+ * 距离页面底部的距离
20
+ * @default 40
21
+ */
22
+ bottom?: number;
23
+ }
24
+ /**
25
+ * Backtop Emits
26
+ */
27
+ export interface BacktopEmits {
28
+ (e: 'click', event: MouseEvent): void;
29
+ }
30
+ /**
31
+ * Backtop 组件实例类型
32
+ */
33
+ export type BacktopInstance = InstanceType<typeof import('./index.vue').default>;
@@ -0,0 +1,24 @@
1
+ export interface DrawerProps {
2
+ /** Whether Drawer is visible */
3
+ modelValue?: boolean;
4
+ /** Drawer title */
5
+ title?: string;
6
+ /** Drawer size */
7
+ size?: string | number;
8
+ /** @deprecated Use `size` instead */
9
+ width?: string | number;
10
+ /** Drawer direction */
11
+ direction?: 'ltr' | 'rtl' | 'ttb' | 'btt';
12
+ /** @deprecated Use `direction` instead */
13
+ placement?: 'ltr' | 'rtl' | 'ttb' | 'btt';
14
+ /** Whether to show close button */
15
+ showClose?: boolean;
16
+ /** Whether to destroy Drawer content on close */
17
+ destroyOnClose?: boolean;
18
+ /** Whether Drawer has modal mask */
19
+ modal?: boolean;
20
+ /** Whether to close Drawer on mask click */
21
+ closeOnClickModal?: boolean;
22
+ /** Whether to close Drawer on Escape key press */
23
+ closeOnPressEscape?: boolean;
24
+ }
@@ -0,0 +1,54 @@
1
+ type __VLS_Props = {
2
+ modelValue?: boolean;
3
+ title?: string;
4
+ /** @deprecated Use `direction` instead */
5
+ placement?: 'ltr' | 'rtl' | 'ttb' | 'btt';
6
+ direction?: 'ltr' | 'rtl' | 'ttb' | 'btt';
7
+ /** @deprecated Use `size` instead */
8
+ width?: string | number;
9
+ size?: string | number;
10
+ withHeader?: boolean;
11
+ showClose?: boolean;
12
+ closeOnClickModal?: boolean;
13
+ destroyOnClose?: boolean;
14
+ modal?: boolean;
15
+ };
16
+ declare function __VLS_template(): {
17
+ attrs: Partial<{}>;
18
+ slots: {
19
+ title?(_: {}): any;
20
+ default?(_: {}): any;
21
+ footer?(_: {}): any;
22
+ };
23
+ refs: {};
24
+ rootEl: any;
25
+ };
26
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
27
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
+ open: () => any;
29
+ "update:modelValue": (value: boolean) => any;
30
+ close: () => any;
31
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
32
+ onOpen?: (() => any) | undefined;
33
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
34
+ onClose?: (() => any) | undefined;
35
+ }>, {
36
+ modelValue: boolean;
37
+ title: string;
38
+ width: string | number;
39
+ modal: boolean;
40
+ closeOnClickModal: boolean;
41
+ showClose: boolean;
42
+ destroyOnClose: boolean;
43
+ size: string | number;
44
+ placement: "ltr" | "rtl" | "ttb" | "btt";
45
+ direction: "ltr" | "rtl" | "ttb" | "btt";
46
+ withHeader: boolean;
47
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
48
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
49
+ export default _default;
50
+ type __VLS_WithTemplateSlots<T, S> = T & {
51
+ new (): {
52
+ $slots: S;
53
+ };
54
+ };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Drawer 组件类型定义
3
+ */
4
+ /**
5
+ * Drawer 方向
6
+ */
7
+ export type DrawerDirection = 'ltr' | 'rtl' | 'ttb' | 'btt';
8
+ /**
9
+ * Drawer Props
10
+ */
11
+ export interface DrawerProps {
12
+ /**
13
+ * 是否显示 Drawer(支持 v-model)
14
+ * @default false
15
+ */
16
+ modelValue?: boolean;
17
+ /**
18
+ * Drawer 标题
19
+ */
20
+ title?: string;
21
+ /**
22
+ * Drawer 方向(已废弃,请使用 direction)
23
+ * @deprecated Use `direction` instead
24
+ */
25
+ placement?: DrawerDirection;
26
+ /**
27
+ * Drawer 方向
28
+ * @default 'rtl'
29
+ */
30
+ direction?: DrawerDirection;
31
+ /**
32
+ * Drawer 宽度(已废弃,请使用 size)
33
+ * @deprecated Use `size` instead
34
+ */
35
+ width?: string | number;
36
+ /**
37
+ * Drawer 尺寸
38
+ * @default '30%'
39
+ */
40
+ size?: string | number;
41
+ /**
42
+ * 是否显示 Header
43
+ * @default true
44
+ */
45
+ withHeader?: boolean;
46
+ /**
47
+ * 是否显示关闭按钮
48
+ * @default true
49
+ */
50
+ showClose?: boolean;
51
+ /**
52
+ * 点击遮罩层是否关闭 Drawer
53
+ * @default true
54
+ */
55
+ closeOnClickModal?: boolean;
56
+ /**
57
+ * 关闭时是否销毁内容
58
+ * @default false
59
+ */
60
+ destroyOnClose?: boolean;
61
+ /**
62
+ * 是否显示遮罩层
63
+ * @default true
64
+ */
65
+ modal?: boolean;
66
+ }
67
+ /**
68
+ * Drawer Emits
69
+ */
70
+ export interface DrawerEmits {
71
+ (e: 'update:modelValue', value: boolean): void;
72
+ (e: 'close'): void;
73
+ (e: 'open'): void;
74
+ }
75
+ /**
76
+ * Drawer 组件实例类型
77
+ */
78
+ export type DrawerInstance = InstanceType<typeof import('./index.vue').default>;
@@ -0,0 +1,2 @@
1
+ export { default as DrawerForm } from './index.vue';
2
+ export type { FormField, DrawerFormProps, DrawerFormEmits } from './types';
@@ -0,0 +1,67 @@
1
+ export interface FormField {
2
+ name: string;
3
+ label: string;
4
+ type: 'input' | 'textarea' | 'select' | 'number' | 'switch' | 'date' | 'file';
5
+ value?: any;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ placeholder?: string;
9
+ options?: Array<{
10
+ label: string;
11
+ value: any;
12
+ }>;
13
+ rules?: Array<{
14
+ type: string;
15
+ message: string;
16
+ }>;
17
+ }
18
+ export interface DrawerFormProps {
19
+ /** 是否显示 */
20
+ modelValue?: boolean;
21
+ /** 抽屉标题 */
22
+ title?: string;
23
+ /** 抽屉宽度 */
24
+ size?: string | number;
25
+ /** 表单字段 */
26
+ fields?: FormField[];
27
+ /** 表单数据 */
28
+ formData?: Record<string, any>;
29
+ /** 是否显示确认按钮 */
30
+ showConfirm?: boolean;
31
+ /** 是否显示取消按钮 */
32
+ showCancel?: boolean;
33
+ /** 确认按钮文本 */
34
+ confirmText?: string;
35
+ /** 取消按钮文本 */
36
+ cancelText?: string;
37
+ /** 是否禁用表单 */
38
+ disabled?: boolean;
39
+ /** 是否在关闭时销毁内容 */
40
+ destroyOnClose?: boolean;
41
+ }
42
+ declare const _default: import('vue').DefineComponent<DrawerFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
43
+ "update:modelValue": (value: boolean) => any;
44
+ close: () => any;
45
+ cancel: () => any;
46
+ confirm: (data: Record<string, any>) => any;
47
+ "field-change": (name: string, value: any) => any;
48
+ }, string, import('vue').PublicProps, Readonly<DrawerFormProps> & Readonly<{
49
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
50
+ onClose?: (() => any) | undefined;
51
+ onCancel?: (() => any) | undefined;
52
+ onConfirm?: ((data: Record<string, any>) => any) | undefined;
53
+ "onField-change"?: ((name: string, value: any) => any) | undefined;
54
+ }>, {
55
+ modelValue: boolean;
56
+ title: string;
57
+ destroyOnClose: boolean;
58
+ size: string | number;
59
+ disabled: boolean;
60
+ fields: FormField[];
61
+ formData: Record<string, any>;
62
+ showConfirm: boolean;
63
+ showCancel: boolean;
64
+ confirmText: string;
65
+ cancelText: string;
66
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
67
+ export default _default;
@@ -0,0 +1,48 @@
1
+ export interface FormField {
2
+ name: string;
3
+ label: string;
4
+ type: 'input' | 'textarea' | 'select' | 'number' | 'switch' | 'date' | 'file';
5
+ value?: any;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ placeholder?: string;
9
+ options?: Array<{
10
+ label: string;
11
+ value: any;
12
+ }>;
13
+ rules?: Array<{
14
+ type: string;
15
+ message: string;
16
+ }>;
17
+ }
18
+ export interface DrawerFormProps {
19
+ /** 是否显示 */
20
+ modelValue?: boolean;
21
+ /** 抽屉标题 */
22
+ title?: string;
23
+ /** 抽屉宽度 */
24
+ size?: string | number;
25
+ /** 表单字段 */
26
+ fields?: FormField[];
27
+ /** 表单数据 */
28
+ formData?: Record<string, any>;
29
+ /** 是否显示确认按钮 */
30
+ showConfirm?: boolean;
31
+ /** 是否显示取消按钮 */
32
+ showCancel?: boolean;
33
+ /** 确认按钮文本 */
34
+ confirmText?: string;
35
+ /** 取消按钮文本 */
36
+ cancelText?: string;
37
+ /** 是否禁用表单 */
38
+ disabled?: boolean;
39
+ /** 是否在关闭时销毁内容 */
40
+ destroyOnClose?: boolean;
41
+ }
42
+ export interface DrawerFormEmits {
43
+ 'update:modelValue': [value: boolean];
44
+ 'confirm': [data: Record<string, any>];
45
+ 'cancel': [];
46
+ 'close': [];
47
+ 'field-change': [name: string, value: any];
48
+ }
@@ -0,0 +1,68 @@
1
+ import { App } from 'vue';
2
+ import { default as MessageService } from './message';
3
+ export type { MessageType, MessageProps, MessageInstance, MessageOptions, MessageReturnType } from './types';
4
+ export type { Message as MessageFn } from './types';
5
+ export declare const Message: import('./types').Message;
6
+ export default MessageService;
7
+ export declare const MessageComponent: {
8
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').MessageProps> & Readonly<{
9
+ onClose?: (() => any) | undefined;
10
+ onDestroy?: (() => any) | undefined;
11
+ }>, {
12
+ close: () => void;
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ close: () => any;
15
+ destroy: () => any;
16
+ }, import('vue').PublicProps, {
17
+ showClose: boolean;
18
+ center: boolean;
19
+ type: import('./types').MessageType;
20
+ duration: number;
21
+ offset: number;
22
+ message: string | import('vue').VNode;
23
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
24
+ P: {};
25
+ B: {};
26
+ D: {};
27
+ C: {};
28
+ M: {};
29
+ Defaults: {};
30
+ }, Readonly<import('./types').MessageProps> & Readonly<{
31
+ onClose?: (() => any) | undefined;
32
+ onDestroy?: (() => any) | undefined;
33
+ }>, {
34
+ close: () => void;
35
+ }, {}, {}, {}, {
36
+ showClose: boolean;
37
+ center: boolean;
38
+ type: import('./types').MessageType;
39
+ duration: number;
40
+ offset: number;
41
+ message: string | import('vue').VNode;
42
+ }>;
43
+ __isFragment?: never;
44
+ __isTeleport?: never;
45
+ __isSuspense?: never;
46
+ } & import('vue').ComponentOptionsBase<Readonly<import('./types').MessageProps> & Readonly<{
47
+ onClose?: (() => any) | undefined;
48
+ onDestroy?: (() => any) | undefined;
49
+ }>, {
50
+ close: () => void;
51
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
52
+ close: () => any;
53
+ destroy: () => any;
54
+ }, string, {
55
+ showClose: boolean;
56
+ center: boolean;
57
+ type: import('./types').MessageType;
58
+ duration: number;
59
+ offset: number;
60
+ message: string | import('vue').VNode;
61
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
62
+ $slots: {
63
+ default?(_: {}): any;
64
+ };
65
+ });
66
+ export declare const TMessage: {
67
+ install(app: App): void;
68
+ };
@@ -0,0 +1,33 @@
1
+ import { MessageProps } from './index';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<MessageProps, {
12
+ close: () => void;
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ close: () => any;
15
+ destroy: () => any;
16
+ }, string, import('vue').PublicProps, Readonly<MessageProps> & Readonly<{
17
+ onClose?: (() => any) | undefined;
18
+ onDestroy?: (() => any) | undefined;
19
+ }>, {
20
+ showClose: boolean;
21
+ center: boolean;
22
+ type: import('./types').MessageType;
23
+ duration: number;
24
+ offset: number;
25
+ message: string | import('vue').VNode;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
+ export default _default;
29
+ type __VLS_WithTemplateSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,5 @@
1
+ import { Message } from './types';
2
+ declare const closeAll: () => void;
3
+ declare const Message: Message;
4
+ export default Message;
5
+ export { closeAll };
@@ -0,0 +1,88 @@
1
+ import { VNode } from 'vue';
2
+ /**
3
+ * Message 类型
4
+ */
5
+ export type MessageType = 'success' | 'warning' | 'error' | 'info';
6
+ /**
7
+ * Message Props
8
+ */
9
+ export interface MessageProps {
10
+ /**
11
+ * 消息内容
12
+ */
13
+ message?: string | VNode;
14
+ /**
15
+ * 消息类型
16
+ * @default 'info'
17
+ */
18
+ type?: MessageType;
19
+ /**
20
+ * 显示时间(毫秒)
21
+ * @default 3000
22
+ */
23
+ duration?: number;
24
+ /**
25
+ * 是否显示关闭按钮
26
+ * @default false
27
+ */
28
+ showClose?: boolean;
29
+ /**
30
+ * 是否居中对齐
31
+ * @default false
32
+ */
33
+ center?: boolean;
34
+ /**
35
+ * 距离顶部的偏移量
36
+ * @default 20
37
+ */
38
+ offset?: number;
39
+ /**
40
+ * 自定义类名
41
+ */
42
+ customClass?: string;
43
+ /**
44
+ * 关闭回调
45
+ */
46
+ onClose?: () => void;
47
+ }
48
+ /**
49
+ * Message 实例
50
+ */
51
+ export interface MessageInstance {
52
+ /**
53
+ * 关闭消息
54
+ */
55
+ close: () => void;
56
+ }
57
+ /**
58
+ * Message 函数参数
59
+ */
60
+ export interface MessageOptions extends Partial<MessageProps> {
61
+ /**
62
+ * 消息内容
63
+ */
64
+ message?: string | VNode;
65
+ /**
66
+ * 消息ID
67
+ */
68
+ id?: string;
69
+ }
70
+ /**
71
+ * Message 函数类型
72
+ */
73
+ export type MessageFn = (message: string | MessageOptions) => MessageInstance;
74
+ /**
75
+ * Message 函数返回类型
76
+ */
77
+ export type MessageReturnType = MessageInstance;
78
+ /**
79
+ * Message 服务接口
80
+ */
81
+ export interface Message {
82
+ info: MessageFn;
83
+ success: MessageFn;
84
+ warning: MessageFn;
85
+ error: MessageFn;
86
+ (options: MessageOptions): MessageInstance;
87
+ closeAll: () => void;
88
+ }
@@ -0,0 +1,9 @@
1
+ import { App } from 'vue';
2
+ import { default as MessageBoxService } from './messageBox';
3
+ export type { MessageBoxMessageType, MessageBoxOptions, MessageBoxResult, MessageBoxFn } from './types';
4
+ export type { MessageBox as MessageBoxType } from './types';
5
+ export declare const MessageBox: import('./types').MessageBox;
6
+ export default MessageBoxService;
7
+ export declare const TMessageBox: {
8
+ install(app: App): void;
9
+ };
@@ -0,0 +1,5 @@
1
+ import { MessageBox } from './types';
2
+ declare const closeAll: () => void;
3
+ declare const MessageBox: MessageBox;
4
+ export default MessageBox;
5
+ export { closeAll };