Sfoglia il codice sorgente

✨ feat(admin): 优化用户管理页面消息提示

- 引入App组件并使用useApp()获取message实例,优化消息提示功能
- 移除单独导入的message组件,统一使用App提供的上下文消息实例
yourname 5 mesi fa
parent
commit
deba09cfe0
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      src/client/admin/pages/Users.tsx

+ 3 - 2
src/client/admin/pages/Users.tsx

@@ -1,7 +1,7 @@
 import React, { useState } from 'react';
 import {
-  Button, Table, Space, Form, Input, Select,
-  message, Modal, Card, Typography, Tag, Popconfirm
+  Button, Table, Space, Form, Input, Select, Modal, Card, Typography, Tag, Popconfirm,
+  App
 } from 'antd';
 import { useQuery } from '@tanstack/react-query';
 import dayjs from 'dayjs';
@@ -19,6 +19,7 @@ const { Title } = Typography;
 
 // 用户管理页面
 export const UsersPage = () => {
+  const { message } = App.useApp();
   const [searchParams, setSearchParams] = useState({
     page: 1,
     limit: 10,