diff --git a/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx b/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx index badda10..ca5e1c9 100644 --- a/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx +++ b/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx @@ -222,6 +222,10 @@ export default () => { case "year": const yearlySums: { [year: string]: { pv: number, ip: number } } = {}; + console.log(result.items); + console.log(result.items[0]); + + result.items[0].forEach((dateArray: string[], index: number) => { const date: string = dateArray[0]; const [year, month, day] = date.split('/'); diff --git a/src/pages/Tag/index.tsx b/src/pages/Tag/index.tsx index 6ff6309..171b23f 100644 --- a/src/pages/Tag/index.tsx +++ b/src/pages/Tag/index.tsx @@ -107,26 +107,28 @@ export default () => { <div className='flex md:justify-between flex-col md:flex-row mx-auto mt-2 h-[calc(100vh-180px)]'> - <Spin spinning={editLoading} className='w-full md:w-[40%] '> - {/* <Card className="w-full md:w-[40%] h-46"> */} - <Card className="w-full h-46"> - <Form - form={form} - layout="vertical" - initialValues={tag} - onFinish={onSubmit} - size='large' - > - <Form.Item label="标签名称" name="name" rules={[{ required: true, message: '标签名称不能为空' }]}> - <Input placeholder="请输入标签名称" /> - </Form.Item> + <div className='w-full md:w-[40%]'> + <Spin spinning={editLoading}> + {/* <Card className="w-full md:w-[40%] h-46"> */} + <Card className="w-full h-46"> + <Form + form={form} + layout="vertical" + initialValues={tag} + onFinish={onSubmit} + size='large' + > + <Form.Item label="标签名称" name="name" rules={[{ required: true, message: '标签名称不能为空' }]}> + <Input placeholder="请输入标签名称" /> + </Form.Item> - <Form.Item> - <Button type="primary" htmlType="submit" loading={btnLoading} className="w-full">{tag.id ? '编辑标签' : '新增标签'}</Button> - </Form.Item> - </Form> - </Card> - </Spin> + <Form.Item> + <Button type="primary" htmlType="submit" loading={btnLoading} className="w-full">{tag.id ? '编辑标签' : '新增标签'}</Button> + </Form.Item> + </Form> + </Card> + </Spin> + </div> <Card className="w-full md:w-[59%] [&>.ant-card-body]:!p-0 mt-2 md:mt-0"> <Table diff --git a/src/pages/Wall/index.tsx b/src/pages/Wall/index.tsx index 60ba81e..6ebd8b7 100644 --- a/src/pages/Wall/index.tsx +++ b/src/pages/Wall/index.tsx @@ -54,7 +54,7 @@ export default () => { getCateList() }, []); - const columns: ColumnsType = [ + const columns: ColumnsType<Wall> = [ { title: 'ID', dataIndex: 'id', @@ -65,7 +65,7 @@ export default () => { title: '分类', dataIndex: 'cate', key: 'cate', - render: ({ name }, { color }) => <Tag bordered={false} color={color} className='!text-[#565656]'>{name}</Tag>, + render: ({ name }, { color }) => <Tag bordered={false} color={color} className='!text-[#565656] dark:!text-white'>{name}</Tag>, }, { title: '名称', @@ -77,7 +77,7 @@ export default () => { dataIndex: 'content', key: 'content', width: 400, - render: (text: string, record) => <span className="hover:text-primary cursor-pointer line-clamp-2" onClick={() => { + render: (text: string, record: Wall) => <span className="hover:text-primary cursor-pointer line-clamp-2" onClick={() => { setWall(record) setIsModalOpen(true) }}>{text}</span> diff --git a/src/pages/Web/index.tsx b/src/pages/Web/index.tsx index e6f22cb..284f626 100644 --- a/src/pages/Web/index.tsx +++ b/src/pages/Web/index.tsx @@ -178,7 +178,7 @@ export default () => { { Object.keys(list).map((key) => ( <div> - <Card className="[&>.ant-card-body]:flex [&>.ant-card-body]:py-2 [&>.ant-card-body]:px-4 my-2 ml-1.5 text-base bg-[#f5f6ff]"> + <Card className="[&>.ant-card-body]:flex [&>.ant-card-body]:py-2 [&>.ant-card-body]:px-4 my-2 ml-1.5 text-base bg-[#f5f6ff] dark:bg-boxdark transition-colors"> <img src={group} alt="分组图标" className='w-6 h-6 mr-2' /> <span>{key}</span> </Card> diff --git a/src/styles/customAntd.scss b/src/styles/customAntd.scss index 9d744c0..86bb877 100644 --- a/src/styles/customAntd.scss +++ b/src/styles/customAntd.scss @@ -7,4 +7,13 @@ padding: 8px 10px; } } +} + +// 暗色适配 +.ant-card { + @apply overflow-hidden dark:border-strokedark dark:bg-boxdark; + + .ant-card-body { + @apply dark:bg-boxdark; + } } \ No newline at end of file