import { Toast } from '@douyinfe/semi-ui-19'; /** 统一成功提示 */ export function notifySuccess(content: string): void { Toast.success({ content, duration: 2 }); } /** 统一错误提示;带 trace_id 时一并展示,便于用户报障(工程规范 04) */ export function notifyError(message: string, traceId?: string): void { Toast.error({ content: traceId === undefined || traceId.length === 0 ? message : `${message}(trace: ${traceId})`, duration: 4, }); } export function notifyWarning(content: string): void { Toast.warning({ content, duration: 3 }); }