diff --git a/Cunkebao/src/components/FriendSelection/TwoColumnSelection.module.scss b/Cunkebao/src/components/TwoColumnSelection/TwoColumnSelection.module.scss similarity index 99% rename from Cunkebao/src/components/FriendSelection/TwoColumnSelection.module.scss rename to Cunkebao/src/components/TwoColumnSelection/TwoColumnSelection.module.scss index d54b8ea1..5f53a343 100644 --- a/Cunkebao/src/components/FriendSelection/TwoColumnSelection.module.scss +++ b/Cunkebao/src/components/TwoColumnSelection/TwoColumnSelection.module.scss @@ -27,7 +27,7 @@ .searchWrapper { padding: 16px; border-bottom: 1px solid #e8e8e8; - + .ant-input { border-radius: 6px; } @@ -45,15 +45,15 @@ padding: 12px 16px; cursor: pointer; transition: background-color 0.2s; - + &:hover { background-color: #f5f5f5; } - + &.selected { background-color: #e6f7ff; } - + .ant-checkbox { margin-right: 12px; } @@ -119,7 +119,7 @@ display: flex; align-items: center; justify-content: center; - + &:hover { color: #ff4d4f; background: #fff2f0; @@ -150,4 +150,4 @@ height: 100px; color: #999; font-size: 14px; -} \ No newline at end of file +} diff --git a/Cunkebao/src/components/FriendSelection/TwoColumnSelection.tsx b/Cunkebao/src/components/TwoColumnSelection/TwoColumnSelection.tsx similarity index 74% rename from Cunkebao/src/components/FriendSelection/TwoColumnSelection.tsx rename to Cunkebao/src/components/TwoColumnSelection/TwoColumnSelection.tsx index 78858b89..e5400bf6 100644 --- a/Cunkebao/src/components/FriendSelection/TwoColumnSelection.tsx +++ b/Cunkebao/src/components/TwoColumnSelection/TwoColumnSelection.tsx @@ -1,9 +1,9 @@ -import React, { useState, useCallback, useEffect, useMemo, memo } from 'react'; -import { Modal, Input, Avatar, Button, Checkbox, message } from 'antd'; -import { SearchOutlined } from '@ant-design/icons'; -import { getFriendList } from './api'; -import type { FriendSelectionItem } from './data'; -import styles from './TwoColumnSelection.module.scss'; +import React, { useState, useCallback, useEffect, useMemo, memo } from "react"; +import { Modal, Input, Avatar, Button, Checkbox, message } from "antd"; +import { SearchOutlined } from "@ant-design/icons"; +import { getFriendList } from "../FriendSelection/api"; +import type { FriendSelectionItem } from "../FriendSelection/data"; +import styles from "./TwoColumnSelection.module.scss"; // 使用 React.memo 优化好友列表项组件 const FriendListItem = memo<{ @@ -13,7 +13,7 @@ const FriendListItem = memo<{ }>(({ friend, isSelected, onSelect }) => { return (