优化暗黑适配30%
This commit is contained in:
@@ -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('/');
|
||||
|
||||
@@ -107,26 +107,28 @@ export default () => {
|
||||
<Title value="标签管理" />
|
||||
|
||||
<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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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