Skip to content

Commit 123d04d

Browse files
committed
feat: message support custom style and class #3443
1 parent 674933a commit 123d04d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

components/message/index.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { VNodeTypes } from 'vue';
1+
import { CSSProperties, VNodeTypes } from 'vue';
22
import Notification from '../vc-notification';
33
import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined';
44
import ExclamationCircleFilled from '@ant-design/icons-vue/ExclamationCircleFilled';
@@ -66,6 +66,8 @@ export interface ArgsProps {
6666
onClose?: () => void;
6767
icon?: VNodeTypes;
6868
key?: string | number;
69+
style?: CSSProperties;
70+
class?: string;
6971
}
7072

7173
function notice(args: ArgsProps): MessageType {
@@ -85,7 +87,8 @@ function notice(args: ArgsProps): MessageType {
8587
instance.notice({
8688
key: target,
8789
duration,
88-
style: {},
90+
style: args.style || {},
91+
class: args.class,
8992
content: () => {
9093
return (
9194
<div

0 commit comments

Comments
 (0)