import React, { useReducer, useRef } from 'react'; import MessageBox from 'components/message-box'; import Button from 'components/button'; export const Alert = () => { return ; function onClickHander() { MessageBox.alert('这是一段内容', '标题名称').catch(() => {}); } }; export const Confirm = () => { return ; function onClickHander() { MessageBox.confirm('确认删除操作?', '提示', { type: 'warning', }) .then(() => { // Message({ // type: 'success', // message: '删除成功!' // }); }) .catch(() => { // Message({ // type: 'info', // message: '已取消删除' // }); }); } };