import Notice from '../vc-notification/Notice'; import type { NoticeProps } from '../vc-notification/Notice'; import useStyle from './style'; import type { NoticeType } from './interface'; import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined'; import ExclamationCircleFilled from '@ant-design/icons-vue/ExclamationCircleFilled'; import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled'; import CheckCircleFilled from '@ant-design/icons-vue/CheckCircleFilled'; import InfoCircleFilled from '@ant-design/icons-vue/InfoCircleFilled'; import type { VueNode } from '../_util/type'; import classNames from '../_util/classNames'; import { useConfigContextInject } from '../config-provider/context'; import { computed, defineComponent } from 'vue'; export const TypeIcon = { info: , success: , error: , warning: , loading: , }; export interface PureContentProps { prefixCls: string; type?: NoticeType; icon?: VueNode; } export const PureContent = defineComponent({ name: 'PureContent', inheritAttrs: false, props: ['prefixCls', 'type', 'icon'] as any, setup(props, { slots }) { return () => (
{props.icon || TypeIcon[props.type!]} {slots.default?.()}
); }, }); export interface PurePanelProps extends Omit, Omit { prefixCls?: string; } /** @private Internal Component. Do not use in your production. */ export default defineComponent({ name: 'PurePanel', inheritAttrs: false, props: ['prefixCls', 'class', 'type', 'icon', 'content'] as any, setup(props, { slots, attrs }) { const { getPrefixCls } = useConfigContextInject(); const prefixCls = computed(() => props.prefixCls || getPrefixCls('message')); const [, hashId] = useStyle(prefixCls); return ( {slots.default?.()} ); }, });