前端: 添加通知组件

This commit is contained in:
Frontend Developer 2026-03-10 09:13:08 +00:00
parent 2102b60930
commit d906b9ae37

View File

@ -0,0 +1,22 @@
import React from 'react';
import { notification } from 'antd';
const { success, error, warning, info } = notification;
export const showSuccess = (message, description) => {
success({ message, description, placement: 'topRight' });
};
export const showError = (message, description) => {
error({ message, description, placement: 'topRight' });
};
export const showWarning = (message, description) => {
warning({ message, description, placement: 'topRight' });
};
export const showInfo = (message, description) => {
info({ message, description, placement: 'topRight' });
};
export default notification;