From e1eb3ea8caa59c955061f3094cfe55b737eb195a Mon Sep 17 00:00:00 2001 From: hzm <934585316@qq.com> Date: Thu, 12 Mar 2026 22:22:42 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=BC=B9=E6=A1=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/GroupManageModal.jsx | 236 ++++++++++++++-------------- app/components/GroupModal.jsx | 11 -- app/components/PcFundTable.jsx | 1 - 3 files changed, 116 insertions(+), 132 deletions(-) diff --git a/app/components/GroupManageModal.jsx b/app/components/GroupManageModal.jsx index 048d60e..fb2f474 100644 --- a/app/components/GroupManageModal.jsx +++ b/app/components/GroupManageModal.jsx @@ -1,7 +1,8 @@ 'use client'; import { useState } from 'react'; -import { AnimatePresence, motion, Reorder } from 'framer-motion'; +import { AnimatePresence, Reorder } from 'framer-motion'; +import { Dialog, DialogContent, DialogTitle } from '../../components/ui/dialog'; import ConfirmModal from './ConfirmModal'; import { CloseIcon, DragIcon, PlusIcon, SettingsIcon, TrashIcon } from './Icons'; @@ -56,129 +57,124 @@ export default function GroupManageModal({ groups, onClose, onSave }) { const isAllValid = items.every(it => it.name.trim() !== ''); return ( - - e.stopPropagation()} + <> + { + if (!open) onClose(); + }} > -
-
- - 管理分组 -
- -
- -
- {items.length === 0 ? ( -
-
📂
-

暂无自定义分组

+ event.preventDefault()} + > + +
+
+ + 管理分组 +
- ) : ( - - - {items.map((item) => ( - -
- -
- handleRename(item.id, e.target.value)} - placeholder="请输入分组名称..." - style={{ - flex: 1, - height: '36px', - background: 'rgba(0,0,0,0.2)', - border: !item.name.trim() ? '1px solid var(--danger)' : 'none' +
+ +
+ {items.length === 0 ? ( +
+
📂
+

暂无自定义分组

+
+ ) : ( + + + {items.map((item) => ( + - - - ))} - - - )} - -
+
+ +
+ handleRename(item.id, e.target.value)} + placeholder="请输入分组名称..." + style={{ + flex: 1, + height: '36px', + background: 'rgba(0,0,0,0.2)', + border: !item.name.trim() ? '1px solid var(--danger)' : 'none' + }} + /> + + + ))} + + + )} + +
-
- {!isAllValid && ( -
- 所有分组名称均不能为空 -
- )} - -
- +
+ {!isAllValid && ( +
+ 所有分组名称均不能为空 +
+ )} + +
+ +
{deleteConfirm && ( @@ -190,6 +186,6 @@ export default function GroupManageModal({ groups, onClose, onSave }) { /> )} -
+ ); } diff --git a/app/components/GroupModal.jsx b/app/components/GroupModal.jsx index 154f7be..42988ee 100644 --- a/app/components/GroupModal.jsx +++ b/app/components/GroupModal.jsx @@ -20,7 +20,6 @@ export default function GroupModal({ onClose, onConfirm }) {
@@ -30,16 +29,6 @@ export default function GroupModal({ onClose, onConfirm }) { 新增分组
- - -
diff --git a/app/components/PcFundTable.jsx b/app/components/PcFundTable.jsx index 9cd8db9..e276e8c 100644 --- a/app/components/PcFundTable.jsx +++ b/app/components/PcFundTable.jsx @@ -1179,7 +1179,6 @@ export default function PcFundTable({ > e.preventDefault() : undefined} >