@alifd/chat 0.2.0 → 0.3.0-beta.0
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/HTMLRenderer/index.d.ts +4 -0
- package/es/HTMLRenderer/index.js +138 -0
- package/es/HTMLRenderer/index.less +194 -0
- package/es/HTMLRenderer/main.scss +233 -0
- package/es/HTMLRenderer/style.d.ts +1 -0
- package/es/HTMLRenderer/style.js +1 -0
- package/es/HTMLRenderer/types.d.ts +46 -0
- package/es/HTMLRenderer/types.js +1 -0
- package/es/ImagePreview/index.d.ts +13 -0
- package/es/ImagePreview/index.js +72 -0
- package/es/ImagePreview/main.scss +15 -0
- package/es/ImagePreview/style.d.ts +1 -0
- package/es/ImagePreview/style.js +1 -0
- package/es/ImagePreview/types.d.ts +31 -0
- package/es/ImagePreview/types.js +1 -0
- package/es/balloon/index.d.ts +7 -0
- package/es/balloon/index.js +7 -0
- package/es/balloon/style.d.ts +1 -0
- package/es/balloon/style.js +1 -0
- package/es/balloon/types.d.ts +219 -0
- package/es/balloon/types.js +1 -0
- package/es/card-loading/index.d.ts +11 -0
- package/es/card-loading/index.js +18 -0
- package/es/card-loading/main.scss +5 -0
- package/es/card-loading/style.d.ts +2 -0
- package/es/card-loading/style.js +2 -0
- package/es/card-loading/types.d.ts +10 -0
- package/es/card-loading/types.js +1 -0
- package/es/feedback/types.d.ts +8 -0
- package/es/float-button/hooks/useAutoHide.d.ts +0 -1
- package/es/float-button/hooks/useDragable.d.ts +0 -1
- package/es/float-button/index.d.ts +0 -1
- package/es/icon/index.d.ts +12 -0
- package/es/icon/index.js +21 -0
- package/es/icon/main.scss +1 -0
- package/es/icon/style.d.ts +2 -0
- package/es/icon/style.js +2 -0
- package/es/icon/types.d.ts +43 -0
- package/es/icon/types.js +1 -0
- package/es/index.d.ts +8 -0
- package/es/index.js +9 -1
- package/es/input/index.d.ts +1 -2
- package/es/list/index.d.ts +8 -0
- package/es/list/index.js +8 -0
- package/es/list/style.d.ts +1 -0
- package/es/list/style.js +1 -0
- package/es/list/types.d.ts +93 -0
- package/es/list/types.js +1 -0
- package/es/markdown/index.d.ts +6 -0
- package/es/markdown/index.js +138 -0
- package/es/markdown/main.scss +153 -0
- package/es/markdown/style.d.ts +3 -0
- package/es/markdown/style.js +3 -0
- package/es/markdown/types.d.ts +21 -0
- package/es/markdown/types.js +1 -0
- package/es/message/index.d.ts +75 -0
- package/es/message/index.js +30 -0
- package/es/message/main.scss +2 -0
- package/es/message/style.d.ts +2 -0
- package/es/message/style.js +2 -0
- package/es/message/types.d.ts +195 -0
- package/es/message/types.js +1 -0
- package/es/person-picker/index.d.ts +377 -2
- package/es/person-picker/index.js +3 -3
- package/es/tab/main.scss +2 -3
- package/es/tag/index.d.ts +20 -20
- package/es/tag/index.js +2 -2
- package/es/tag/main.scss +1 -1
- package/es/utils/func.d.ts +1 -0
- package/es/utils/func.js +9 -0
- package/lib/HTMLRenderer/index.d.ts +4 -0
- package/lib/HTMLRenderer/index.js +141 -0
- package/lib/HTMLRenderer/index.less +194 -0
- package/lib/HTMLRenderer/main.scss +233 -0
- package/lib/HTMLRenderer/style.d.ts +1 -0
- package/lib/HTMLRenderer/style.js +3 -0
- package/lib/HTMLRenderer/types.d.ts +46 -0
- package/lib/HTMLRenderer/types.js +2 -0
- package/lib/ImagePreview/index.d.ts +13 -0
- package/lib/ImagePreview/index.js +75 -0
- package/lib/ImagePreview/main.scss +15 -0
- package/lib/ImagePreview/style.d.ts +1 -0
- package/lib/ImagePreview/style.js +3 -0
- package/lib/ImagePreview/types.d.ts +31 -0
- package/lib/ImagePreview/types.js +2 -0
- package/lib/balloon/index.d.ts +7 -0
- package/lib/balloon/index.js +11 -0
- package/lib/balloon/style.d.ts +1 -0
- package/lib/balloon/style.js +3 -0
- package/lib/balloon/types.d.ts +219 -0
- package/lib/balloon/types.js +2 -0
- package/lib/card/view/card.js +2 -3
- package/lib/card-loading/index.d.ts +11 -0
- package/lib/card-loading/index.js +21 -0
- package/lib/card-loading/main.scss +5 -0
- package/lib/card-loading/style.d.ts +2 -0
- package/lib/card-loading/style.js +4 -0
- package/lib/card-loading/types.d.ts +10 -0
- package/lib/card-loading/types.js +2 -0
- package/lib/feedback/types.d.ts +8 -0
- package/lib/float-button/hooks/useAutoAlign.js +1 -2
- package/lib/float-button/hooks/useAutoHide.d.ts +0 -1
- package/lib/float-button/hooks/useAutoHide.js +1 -2
- package/lib/float-button/hooks/useDragable.d.ts +0 -1
- package/lib/float-button/hooks/useDragable.js +1 -2
- package/lib/float-button/hooks/useNestleEdge.js +1 -2
- package/lib/float-button/hooks/useTriggerType.js +1 -2
- package/lib/float-button/index.d.ts +0 -1
- package/lib/float-button/util.js +4 -5
- package/lib/float-button/view/balloon.js +1 -2
- package/lib/float-button/view/drawer.js +1 -2
- package/lib/float-button/view/inner-drawer.js +1 -2
- package/lib/icon/index.d.ts +12 -0
- package/lib/icon/index.js +23 -0
- package/lib/icon/main.scss +1 -0
- package/lib/icon/style.d.ts +2 -0
- package/lib/icon/style.js +4 -0
- package/lib/icon/types.d.ts +43 -0
- package/lib/icon/types.js +2 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +30 -16
- package/lib/input/index.d.ts +1 -2
- package/lib/list/index.d.ts +8 -0
- package/lib/list/index.js +12 -0
- package/lib/list/style.d.ts +1 -0
- package/lib/list/style.js +3 -0
- package/lib/list/types.d.ts +93 -0
- package/lib/list/types.js +2 -0
- package/lib/markdown/index.d.ts +6 -0
- package/lib/markdown/index.js +141 -0
- package/lib/markdown/main.scss +153 -0
- package/lib/markdown/style.d.ts +3 -0
- package/lib/markdown/style.js +5 -0
- package/lib/markdown/types.d.ts +21 -0
- package/lib/markdown/types.js +2 -0
- package/lib/message/index.d.ts +75 -0
- package/lib/message/index.js +32 -0
- package/lib/message/main.scss +2 -0
- package/lib/message/style.d.ts +2 -0
- package/lib/message/style.js +4 -0
- package/lib/message/types.d.ts +195 -0
- package/lib/message/types.js +2 -0
- package/lib/person-picker/index.d.ts +377 -2
- package/lib/person-picker/index.js +3 -3
- package/lib/tab/main.scss +2 -3
- package/lib/tag/index.d.ts +20 -20
- package/lib/tag/index.js +2 -2
- package/lib/tag/main.scss +1 -1
- package/lib/utils/common.js +1 -2
- package/lib/utils/dingtalk.js +3 -4
- package/lib/utils/func.d.ts +1 -0
- package/lib/utils/func.js +12 -3
- package/lib/utils/hooks/useControlable.js +1 -2
- package/lib/utils/hooks/useDebounce.js +1 -2
- package/lib/utils/hooks/useThrottle.js +1 -2
- package/package.json +127 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @api Markdown
|
|
4
|
+
*/
|
|
5
|
+
export interface MarkdownProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
/**
|
|
7
|
+
* 自定义类名
|
|
8
|
+
* @en Custom class name
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 组件准备就绪的回调函数
|
|
13
|
+
* @en Callback function when the component is ready
|
|
14
|
+
*/
|
|
15
|
+
onReady?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Markdown 文本
|
|
18
|
+
* @en Data object
|
|
19
|
+
*/
|
|
20
|
+
content: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 标签
|
|
3
|
+
* @en Message
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Message - Same as Next.Message
|
|
6
|
+
* @when Message
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import type { MessageProps } from './types';
|
|
10
|
+
export * from './types';
|
|
11
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<MessageProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/message").MessageProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/message").MessageProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
|
|
12
|
+
state: {
|
|
13
|
+
visible: boolean | undefined;
|
|
14
|
+
};
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
render(): import("react").JSX.Element | null;
|
|
17
|
+
context: any;
|
|
18
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/message").MessageProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
19
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
20
|
+
readonly props: Readonly<import("@alifd/next/types/message").MessageProps> & Readonly<{
|
|
21
|
+
children?: import("react").ReactNode;
|
|
22
|
+
}>;
|
|
23
|
+
refs: {
|
|
24
|
+
[key: string]: import("react").ReactInstance;
|
|
25
|
+
};
|
|
26
|
+
componentDidMount?(): void;
|
|
27
|
+
shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
28
|
+
componentWillUnmount?(): void;
|
|
29
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
30
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>): any;
|
|
31
|
+
componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
32
|
+
componentWillMount?(): void;
|
|
33
|
+
UNSAFE_componentWillMount?(): void;
|
|
34
|
+
componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextContext: any): void;
|
|
35
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextContext: any): void;
|
|
36
|
+
componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
37
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
38
|
+
}>>>, "key" | keyof MessageProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/message").MessageProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/message").MessageProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
|
|
39
|
+
state: {
|
|
40
|
+
visible: boolean | undefined;
|
|
41
|
+
};
|
|
42
|
+
onClose: () => void;
|
|
43
|
+
render(): import("react").JSX.Element | null;
|
|
44
|
+
context: any;
|
|
45
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/message").MessageProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
46
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
47
|
+
readonly props: Readonly<import("@alifd/next/types/message").MessageProps> & Readonly<{
|
|
48
|
+
children?: import("react").ReactNode;
|
|
49
|
+
}>;
|
|
50
|
+
refs: {
|
|
51
|
+
[key: string]: import("react").ReactInstance;
|
|
52
|
+
};
|
|
53
|
+
componentDidMount?(): void;
|
|
54
|
+
shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
55
|
+
componentWillUnmount?(): void;
|
|
56
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
57
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>): any;
|
|
58
|
+
componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/message").MessageProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
59
|
+
componentWillMount?(): void;
|
|
60
|
+
UNSAFE_componentWillMount?(): void;
|
|
61
|
+
componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextContext: any): void;
|
|
62
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextContext: any): void;
|
|
63
|
+
componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
64
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/message").MessageProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
65
|
+
}>>, {}> & {
|
|
66
|
+
loading: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
67
|
+
warning: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
68
|
+
error: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
69
|
+
help: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
70
|
+
hide: () => void;
|
|
71
|
+
show: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
72
|
+
success: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
73
|
+
notice: (config: import("@alifd/next/types/message/types").OpenProps) => void;
|
|
74
|
+
};
|
|
75
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @component 标签
|
|
4
|
+
* @en Message
|
|
5
|
+
* @type 通用 - General
|
|
6
|
+
* @remarks 同 Next Message - Same as Next.Message
|
|
7
|
+
* @when Message
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const tslib_1 = require("tslib");
|
|
11
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
12
|
+
const next_1 = require("@alifd/next");
|
|
13
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
14
|
+
const utils_1 = require("../utils");
|
|
15
|
+
const Message = (0, react_1.forwardRef)((_a, ref) => {
|
|
16
|
+
var { className } = _a, props = tslib_1.__rest(_a, ["className"]);
|
|
17
|
+
return (react_1.default.createElement(next_1.Message, Object.assign({}, props, { ref: ref, className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}message`, className) })));
|
|
18
|
+
});
|
|
19
|
+
const MessageWithSub = (0, utils_1.assignSubComponent)(Message, {
|
|
20
|
+
show: next_1.Message.show,
|
|
21
|
+
success: next_1.Message.success,
|
|
22
|
+
warning: next_1.Message.warning,
|
|
23
|
+
error: next_1.Message.error,
|
|
24
|
+
notice: next_1.Message.notice,
|
|
25
|
+
help: next_1.Message.help,
|
|
26
|
+
loading: next_1.Message.loading,
|
|
27
|
+
hide: next_1.Message.hide,
|
|
28
|
+
});
|
|
29
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
30
|
+
exports.default = next_1.ConfigProvider.config(MessageWithSub, {
|
|
31
|
+
componentName: 'Message',
|
|
32
|
+
});
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { OverlayProps } from '@alifd/next/types/overlay';
|
|
3
|
+
import type { ConsumerState } from '@alifd/next/types/config-provider/consumer';
|
|
4
|
+
type HTMLAttributesWeak = Omit<React.HTMLAttributes<HTMLElement>, 'title'>;
|
|
5
|
+
/**
|
|
6
|
+
* @api Message
|
|
7
|
+
*/
|
|
8
|
+
export interface MessageProps extends HTMLAttributesWeak {
|
|
9
|
+
/**
|
|
10
|
+
* 反馈类型
|
|
11
|
+
* @en type of message
|
|
12
|
+
* @defaultValue 'success'
|
|
13
|
+
*/
|
|
14
|
+
type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
|
|
15
|
+
/**
|
|
16
|
+
* 反馈外观
|
|
17
|
+
* @en shape of message
|
|
18
|
+
* @defaultValue 'inline'
|
|
19
|
+
*/
|
|
20
|
+
shape?: 'inline' | 'addon' | 'toast';
|
|
21
|
+
/**
|
|
22
|
+
* 反馈大小
|
|
23
|
+
* @en size of message
|
|
24
|
+
* @defaultValue 'medium'
|
|
25
|
+
*/
|
|
26
|
+
size?: 'medium' | 'large';
|
|
27
|
+
/**
|
|
28
|
+
* 标题
|
|
29
|
+
* @en title of message
|
|
30
|
+
*/
|
|
31
|
+
title?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* 内容,非函数式调用下使用
|
|
34
|
+
* @en content of message
|
|
35
|
+
*/
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* 默认是否显示
|
|
39
|
+
* @en whether the message is visible in default
|
|
40
|
+
* @defaultValue false
|
|
41
|
+
*/
|
|
42
|
+
defaultVisible?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 当前是否显示
|
|
45
|
+
* @en whether the message is visible currently
|
|
46
|
+
*/
|
|
47
|
+
visible?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 显示的图标类型,会覆盖内部设置的IconType,传false不显示图标
|
|
50
|
+
* @en type of icon, overriding the internally type of icon
|
|
51
|
+
*/
|
|
52
|
+
iconType?: string | false;
|
|
53
|
+
/**
|
|
54
|
+
* 显示关闭按钮
|
|
55
|
+
* @en whether to show the close button
|
|
56
|
+
* @defaultValue false
|
|
57
|
+
*/
|
|
58
|
+
closeable?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 关闭按钮的回调
|
|
61
|
+
* @en callback function triggered when close
|
|
62
|
+
* @defaultValue () =\> \{\}
|
|
63
|
+
*/
|
|
64
|
+
onClose?: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* 关闭之后调用的函数
|
|
67
|
+
* @en callback function triggered after closed
|
|
68
|
+
* @defaultValue () =\> \{\}
|
|
69
|
+
*/
|
|
70
|
+
afterClose?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* 是否开启展开收起动画
|
|
73
|
+
* @en whether to enable expand and collapse animation
|
|
74
|
+
* @defaultValue true
|
|
75
|
+
*/
|
|
76
|
+
animation?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @api Message.show
|
|
80
|
+
* @remarks Message.show(props) 提供一个单例的调用方式,配置参数如下(继承 Overlay 的配置):
|
|
81
|
+
*
|
|
82
|
+
* ```js
|
|
83
|
+
* Message.show({
|
|
84
|
+
* type: 'error',
|
|
85
|
+
* title: '错误',
|
|
86
|
+
* content: '请联系相关人员反馈!',
|
|
87
|
+
* hasMask: true
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
* -
|
|
91
|
+
* `Message.show(props)` provides a singleton call with the following configuration parameters (inheriting `Overlay` configuration):
|
|
92
|
+
* ```js
|
|
93
|
+
* Message.show({
|
|
94
|
+
* type: 'error',
|
|
95
|
+
* title: 'Error',
|
|
96
|
+
* content: 'Please contact admin feedback!',
|
|
97
|
+
* hasMask: true
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export interface MessageQuickProps extends Omit<HTMLAttributesWeak, 'content'> {
|
|
102
|
+
/**
|
|
103
|
+
* 反馈类型
|
|
104
|
+
* @en type of message
|
|
105
|
+
* @defaultValue 'success'
|
|
106
|
+
*/
|
|
107
|
+
type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
|
|
108
|
+
/**
|
|
109
|
+
* 反馈大小
|
|
110
|
+
* @en size of message
|
|
111
|
+
* @defaultValue 'medium'
|
|
112
|
+
*/
|
|
113
|
+
size?: 'medium' | 'large';
|
|
114
|
+
/**
|
|
115
|
+
* 标题
|
|
116
|
+
* @en title of message
|
|
117
|
+
*/
|
|
118
|
+
title?: React.ReactNode;
|
|
119
|
+
/**
|
|
120
|
+
* 内容,函数式调用下使用
|
|
121
|
+
* @en content of message
|
|
122
|
+
*/
|
|
123
|
+
content?: React.ReactNode;
|
|
124
|
+
/**
|
|
125
|
+
* 弹层对齐方式,详情见 Overlay align
|
|
126
|
+
* @en alignment reference Overlay
|
|
127
|
+
* @defaultValue 'tc tc'
|
|
128
|
+
*/
|
|
129
|
+
align?: string | boolean;
|
|
130
|
+
/**
|
|
131
|
+
* 弹层相对于参照元素定位的微调
|
|
132
|
+
* @en offset after positioned
|
|
133
|
+
* @defaultValue [0, 0]
|
|
134
|
+
*/
|
|
135
|
+
offset?: Array<number>;
|
|
136
|
+
/**
|
|
137
|
+
* 是否显示遮罩
|
|
138
|
+
* @en whether to have a mask
|
|
139
|
+
* @defaultValue false
|
|
140
|
+
*/
|
|
141
|
+
hasMask?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* 显示持续时间,0表示一直存在,以毫秒为单位
|
|
144
|
+
* @en show duration, 0 means always present, in milliseconds
|
|
145
|
+
* @defaultValue 3000
|
|
146
|
+
*/
|
|
147
|
+
duration?: number;
|
|
148
|
+
/**
|
|
149
|
+
* @skip
|
|
150
|
+
*/
|
|
151
|
+
timeoutId?: string;
|
|
152
|
+
/**
|
|
153
|
+
* 显示关闭按钮
|
|
154
|
+
* @en whether to show the close button
|
|
155
|
+
* @defaultValue false
|
|
156
|
+
*/
|
|
157
|
+
closeable?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* 关闭按钮的回调
|
|
160
|
+
* @en callback function triggered when close
|
|
161
|
+
* @defaultValue () =\> \{\}
|
|
162
|
+
*/
|
|
163
|
+
onClose?: () => void;
|
|
164
|
+
/**
|
|
165
|
+
* 关闭之后调用的函数
|
|
166
|
+
* @en callback function triggered after closed
|
|
167
|
+
* @defaultValue () =\> \{\}
|
|
168
|
+
*/
|
|
169
|
+
afterClose?: () => void;
|
|
170
|
+
/**
|
|
171
|
+
* 是否开启展开收起动画
|
|
172
|
+
* @en whether to enable expand and collapse animation
|
|
173
|
+
* @defaultValue true
|
|
174
|
+
*/
|
|
175
|
+
animation?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* 透传到弹层组件的属性对象
|
|
178
|
+
* @en props of Overlay
|
|
179
|
+
*/
|
|
180
|
+
overlayProps?: OverlayProps;
|
|
181
|
+
/**
|
|
182
|
+
* @skip
|
|
183
|
+
*/
|
|
184
|
+
contextConfig?: ConsumerState;
|
|
185
|
+
}
|
|
186
|
+
export type OpenProps = string | React.ReactElement | MessageQuickProps;
|
|
187
|
+
export interface MessageWrapperItem extends MessageQuickProps {
|
|
188
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
189
|
+
key: string;
|
|
190
|
+
}
|
|
191
|
+
export interface MessageWrapperProps {
|
|
192
|
+
prefix?: MessageQuickProps['prefix'];
|
|
193
|
+
dataSource: Array<MessageWrapperItem>;
|
|
194
|
+
}
|
|
195
|
+
export {};
|