From 024df07314348dc7c047f332c3a8ad897ba459b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E9=98=B3?= Date: Mon, 20 Jan 2025 16:51:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=97=E9=BB=91=E4=B8=BB=E9=A2=98=E9=80=82?= =?UTF-8?q?=E9=85=8D70%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/DefaultLayout.tsx | 2 +- src/pages/CreateRecord/index.tsx | 2 +- .../components/VisitorsStatisChat/index.tsx | 2 +- src/pages/File/index.tsx | 8 ++-- src/styles/customAntd.scss | 43 ++++++++++++++++--- tailwind.config.cjs | 2 +- 6 files changed, 45 insertions(+), 14 deletions(-) diff --git a/src/layout/DefaultLayout.tsx b/src/layout/DefaultLayout.tsx index e3f52d7..4c29076 100644 --- a/src/layout/DefaultLayout.tsx +++ b/src/layout/DefaultLayout.tsx @@ -6,7 +6,7 @@ const DefaultLayout: React.FC<{ children: ReactNode }> = ({ children }) => { const [sidebarOpen, setSidebarOpen] = useState(false); return ( -
+
{/* */}
{/* */} diff --git a/src/pages/CreateRecord/index.tsx b/src/pages/CreateRecord/index.tsx index c235026..f668793 100644 --- a/src/pages/CreateRecord/index.tsx +++ b/src/pages/CreateRecord/index.tsx @@ -145,7 +145,7 @@ export default () => { placeholder="记录此刻!" value={content} onChange={(e) => setContent(e.target.value)} - className="w-full p-4 border-2 border-[#eee] dark:border-strokedark text-base rounded-md" + className="w-full p-4 border-2 border-[#eee] dark:bg-boxdark-2 dark:border-transparent text-base rounded-md" />
diff --git a/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx b/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx index ca5e1c9..cf4e7de 100644 --- a/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx +++ b/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx @@ -332,7 +332,7 @@ export default () => {
-
+
diff --git a/src/pages/File/index.tsx b/src/pages/File/index.tsx index fdbdcc5..9f295e8 100644 --- a/src/pages/File/index.tsx +++ b/src/pages/File/index.tsx @@ -199,22 +199,22 @@ export default () => {
文件名称 - {file.name} + {file.name}
文件类型 - {file.type} + {file.type}
文件大小 - {(file.size / 1048576).toFixed(2)}MB + {(file.size / 1048576).toFixed(2)}MB
文件链接 - { + { await navigator.clipboard.writeText(file.url) message.success("🎉 复制成功") }}>{file.url} diff --git a/src/styles/customAntd.scss b/src/styles/customAntd.scss index 86bb877..6fa103f 100644 --- a/src/styles/customAntd.scss +++ b/src/styles/customAntd.scss @@ -9,11 +9,42 @@ } } -// 暗色适配 +// ------------------> Antd组件库暗色适配 开始 <------------------ .ant-card { - @apply overflow-hidden dark:border-strokedark dark:bg-boxdark; + @apply overflow-hidden; +} - .ant-card-body { - @apply dark:bg-boxdark; - } -} \ No newline at end of file +.ant-card-body, +.ant-pagination-item, +.ant-drawer-header, +.ant-drawer-body, +.ant-table-cell::before { + @apply dark:bg-boxdark; +} + +.ant-pagination-item:hover, +.ant-table-cell, +.ant-table-row:hover .ant-table-cell, +.ant-card { + @apply dark:!bg-boxdark dark:!border-strokedark; +} + +.ant-input, +.ant-input-affix-wrapper, +.ant-picker-outlined, +.ant-picker-panel-layout, +.ant-picker-range-arrow::before, +.ant-select, +.ant-select-selector, +.ant-modal-content { + @apply dark:!bg-boxdark-2 dark:!border-strokedark; +} + +.ant-modal-header{ + @apply dark:bg-transparent; +} + +.ant-transfer-list{ + @apply dark:border-strokedark; +} +// ------------------> Antd组件库暗色适配 结束 <------------------ \ No newline at end of file diff --git a/tailwind.config.cjs b/tailwind.config.cjs index c9ccfb0..eb863e7 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -40,7 +40,7 @@ module.exports = { whiten: '#F1F5F9', whiter: '#F5F7FD', boxdark: '#334459', - 'boxdark-2': '#1A222C', + 'boxdark-2': '#263444', strokedark: '#475f7d', 'form-strokedark': '#3d4d60', 'form-input': '#1d2a39',