feat: message support custom style and class #3443
parent
674933ae60
commit
123d04d1ef
|
@ -1,4 +1,4 @@
|
||||||
import { VNodeTypes } from 'vue';
|
import { CSSProperties, VNodeTypes } from 'vue';
|
||||||
import Notification from '../vc-notification';
|
import Notification from '../vc-notification';
|
||||||
import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined';
|
import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined';
|
||||||
import ExclamationCircleFilled from '@ant-design/icons-vue/ExclamationCircleFilled';
|
import ExclamationCircleFilled from '@ant-design/icons-vue/ExclamationCircleFilled';
|
||||||
|
@ -66,6 +66,8 @@ export interface ArgsProps {
|
||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
icon?: VNodeTypes;
|
icon?: VNodeTypes;
|
||||||
key?: string | number;
|
key?: string | number;
|
||||||
|
style?: CSSProperties;
|
||||||
|
class?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
function notice(args: ArgsProps): MessageType {
|
function notice(args: ArgsProps): MessageType {
|
||||||
|
@ -85,7 +87,8 @@ function notice(args: ArgsProps): MessageType {
|
||||||
instance.notice({
|
instance.notice({
|
||||||
key: target,
|
key: target,
|
||||||
duration,
|
duration,
|
||||||
style: {},
|
style: args.style || {},
|
||||||
|
class: args.class,
|
||||||
content: () => {
|
content: () => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Reference in New Issue