perf: customPanel pref

This commit is contained in:
JOYCEQL
2024-11-22 14:48:58 +08:00
parent 1042eb45d2
commit 53df312068
3 changed files with 8 additions and 4 deletions
@@ -103,7 +103,11 @@ const DeleteConfirmDialog = ({
)}
onClick={(e) => e.stopPropagation()}
>
<AlertDialogHeader>
<AlertDialogHeader
className={cn(
theme === "dark" ? "text-neutral-200" : "text-gray-900"
)}
>
<AlertDialogTitle></AlertDialogTitle>
<AlertDialogDescription>
{title || "此项"}
@@ -189,7 +193,7 @@ const CustomItem = ({
<div className="flex-1 min-w-0">
<div
className={cn(
"px-4 py-4 flex items-center justify-between",
"px-4 py-4 flex items-center justify-between cursor-pointer select-none",
expandedId === item.id &&
(theme === "dark" ? "bg-neutral-800/50" : "bg-gray-50")
)}
@@ -19,7 +19,7 @@ export function CustomSection({
themeColor
}: CustomSectionProps) {
const visibleItems = items.filter((item) => {
return item.visible && item.description;
return item.visible && (item.title || item.description);
});
return (
+1 -1
View File
@@ -315,7 +315,7 @@ export const useResumeStore = create<ResumeStore>()(
...(state.customData[sectionId] || []),
{
id: crypto.randomUUID(),
title: "",
title: "未命名模块",
subtitle: "",
dateRange: "",
description: "",