UNPKG

@alicloud/console-components

Version:

Alibaba Cloud React Components

56 lines (55 loc) 1.94 kB
/** * title: "" * description: "" */ import React from 'react'; import { Button, Message, Grid } from '@alicloud/console-components'; var Row = Grid.Row, Col = Grid.Col; var showNotice = function () { return Message.notice({ content: '这是一条询问消息,>=3s后主动消失', duration: 3000, }); }; var showSuccess = function () { return Message.success({ content: '这是一条询问消息,>=3s后主动消失', duration: 3000, }); }; var showWarning = function () { return Message.warning({ content: '这是一条询问消息,>=3s后主动消失', duration: 3000, }); }; var showError = function () { return Message.error({ content: '这是一条询问消息,>=3s后主动消失', duration: 3000, }); }; var showHelp = function () { return Message.help({ content: '这是一条询问消息,>=3s后主动消失', duration: 3000 }); }; var showLoading = function () { return Message.loading({ content: '这是一条询问消息,>=3s后主动消失', duration: 3000, }); }; export default (function () { return (React.createElement(Row, null, React.createElement(Col, null, React.createElement(Button, { onClick: showSuccess }, "Message.success")), React.createElement(Col, null, React.createElement(Button, { onClick: showWarning }, "Message.warning")), React.createElement(Col, null, React.createElement(Button, { onClick: showError }, "Message.error")), React.createElement(Col, null, React.createElement(Button, { onClick: showNotice }, "Message.notice")), React.createElement(Col, null, React.createElement(Button, { onClick: showHelp }, "Message.help")), React.createElement(Col, null, React.createElement(Button, { onClick: showLoading }, "Message.loading")))); });