优化全局提醒
This commit is contained in:
@@ -31,6 +31,7 @@ import { RootState, useAppDispatch } from '../store';
|
||||
import { setUserInfo } from '../store/userSlice';
|
||||
import { getUserProfile, updateUserProfile, updateUserPwd, uploadAvatar } from '../api/user';
|
||||
import envConfig from '../../env';
|
||||
import utils from '../lib/utils';
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
const { Title } = Typography;
|
||||
@@ -42,6 +43,7 @@ const Profile: React.FC = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const [form] = Form.useForm();
|
||||
const [pwdForm] = Form.useForm();
|
||||
const message = utils.message; // 使用全局 message
|
||||
|
||||
const fetchProfile = async () => {
|
||||
try {
|
||||
|
||||
@@ -44,6 +44,7 @@ import { orderTypeConfig, sourceTypeMap } from '../constants';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { RootState } from '../store';
|
||||
import { getUser } from '../api/user';
|
||||
import utils from '../lib/utils';
|
||||
|
||||
const { Option } = Select;
|
||||
const { Search } = Input;
|
||||
@@ -92,7 +93,7 @@ const WorkOrderPage = () => {
|
||||
|
||||
const [completeModalVisible, setCompleteModalVisible] = useState(false);
|
||||
const [completeForm] = Form.useForm(); // 完成工单表单
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const messageApi = utils.message; // 使用全局 message
|
||||
|
||||
// 获取用户列表 (用于负责人选择)
|
||||
const fetchUserList = async () => {
|
||||
@@ -409,7 +410,6 @@ const WorkOrderPage = () => {
|
||||
|
||||
return (
|
||||
<div style={{ padding: '0px 0px', background: '#f5f7fa', minHeight: '100vh', boxSizing: 'border-box' }}>
|
||||
{contextHolder}
|
||||
<style>{`
|
||||
.compact-table .ant-table-thead > tr > th { background: #f8fafc; padding: 2px 4px !important; font-size: 12px; color: #4E5969; }
|
||||
.compact-table .ant-table-tbody > tr > td { padding: 2px 4px !important; font-size: 12px; }
|
||||
|
||||
Reference in New Issue
Block a user