How to use the @alifd/next.Message.show function in @alifd/next

To help you get started, we’ve selected a few @alifd/next examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ice-lab / react-materials / scaffolds / ice-pro / src / utils / request.js View on Github external
function showError(errorMessage) {
  Message.show({
    type: 'error',
    title: '错误消息',
    content: errorMessage,
  });
}
github alibaba / ice / packages / iceworks-client / src / utils / showMessage.js View on Github external
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,
  });
}