Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function showError(errorMessage) {
Message.show({
type: 'error',
title: '错误消息',
content: errorMessage,
});
}
export default function showMessage(message, type = 'error') {
let content = 'Please try again';
if (message) {
content = (message instanceof Error || typeof message === 'object') && message.message ? message.message : message;
}
Message.show({
title: 'Message',
align: 'tr tr',
type,
content,
});
}