优化暗黑适配30%
This commit is contained in:
@@ -222,6 +222,10 @@ export default () => {
|
|||||||
case "year":
|
case "year":
|
||||||
const yearlySums: { [year: string]: { pv: number, ip: number } } = {};
|
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) => {
|
result.items[0].forEach((dateArray: string[], index: number) => {
|
||||||
const date: string = dateArray[0];
|
const date: string = dateArray[0];
|
||||||
const [year, month, day] = date.split('/');
|
const [year, month, day] = date.split('/');
|
||||||
|
|||||||
@@ -107,26 +107,28 @@ export default () => {
|
|||||||
<Title value="标签管理" />
|
<Title value="标签管理" />
|
||||||
|
|
||||||
<div className='flex md:justify-between flex-col md:flex-row mx-auto mt-2 h-[calc(100vh-180px)]'>
|
<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%] '>
|
<div className='w-full md:w-[40%]'>
|
||||||
{/* <Card className="w-full md:w-[40%] h-46"> */}
|
<Spin spinning={editLoading}>
|
||||||
<Card className="w-full h-46">
|
{/* <Card className="w-full md:w-[40%] h-46"> */}
|
||||||
<Form
|
<Card className="w-full h-46">
|
||||||
form={form}
|
<Form
|
||||||
layout="vertical"
|
form={form}
|
||||||
initialValues={tag}
|
layout="vertical"
|
||||||
onFinish={onSubmit}
|
initialValues={tag}
|
||||||
size='large'
|
onFinish={onSubmit}
|
||||||
>
|
size='large'
|
||||||
<Form.Item label="标签名称" name="name" rules={[{ required: true, message: '标签名称不能为空' }]}>
|
>
|
||||||
<Input placeholder="请输入标签名称" />
|
<Form.Item label="标签名称" name="name" rules={[{ required: true, message: '标签名称不能为空' }]}>
|
||||||
</Form.Item>
|
<Input placeholder="请输入标签名称" />
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button type="primary" htmlType="submit" loading={btnLoading} className="w-full">{tag.id ? '编辑标签' : '新增标签'}</Button>
|
<Button type="primary" htmlType="submit" loading={btnLoading} className="w-full">{tag.id ? '编辑标签' : '新增标签'}</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</Card>
|
</Card>
|
||||||
</Spin>
|
</Spin>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Card className="w-full md:w-[59%] [&>.ant-card-body]:!p-0 mt-2 md:mt-0">
|
<Card className="w-full md:w-[59%] [&>.ant-card-body]:!p-0 mt-2 md:mt-0">
|
||||||
<Table
|
<Table
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export default () => {
|
|||||||
getCateList()
|
getCateList()
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const columns: ColumnsType = [
|
const columns: ColumnsType<Wall> = [
|
||||||
{
|
{
|
||||||
title: 'ID',
|
title: 'ID',
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
@@ -65,7 +65,7 @@ export default () => {
|
|||||||
title: '分类',
|
title: '分类',
|
||||||
dataIndex: 'cate',
|
dataIndex: 'cate',
|
||||||
key: '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: '名称',
|
title: '名称',
|
||||||
@@ -77,7 +77,7 @@ export default () => {
|
|||||||
dataIndex: 'content',
|
dataIndex: 'content',
|
||||||
key: 'content',
|
key: 'content',
|
||||||
width: 400,
|
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)
|
setWall(record)
|
||||||
setIsModalOpen(true)
|
setIsModalOpen(true)
|
||||||
}}>{text}</span>
|
}}>{text}</span>
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ export default () => {
|
|||||||
{
|
{
|
||||||
Object.keys(list).map((key) => (
|
Object.keys(list).map((key) => (
|
||||||
<div>
|
<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' />
|
<img src={group} alt="分组图标" className='w-6 h-6 mr-2' />
|
||||||
<span>{key}</span>
|
<span>{key}</span>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -8,3 +8,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 暗色适配
|
||||||
|
.ant-card {
|
||||||
|
@apply overflow-hidden dark:border-strokedark dark:bg-boxdark;
|
||||||
|
|
||||||
|
.ant-card-body {
|
||||||
|
@apply dark:bg-boxdark;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user