From a55e567899cccc173296c29cca957d9e3fac244e Mon Sep 17 00:00:00 2001 From: shixiaohua Date: Tue, 23 Apr 2024 15:38:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=A1=A8=E5=A4=B4=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/lib/task/project/data.tsx | 2 +- src/app/task/four/layout.tsx | 8 ++++---- src/app/ui/task/project/TreeTable.tsx | 29 +++++++++++++++++++-------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/app/lib/task/project/data.tsx b/src/app/lib/task/project/data.tsx index c267a44..6449612 100644 --- a/src/app/lib/task/project/data.tsx +++ b/src/app/lib/task/project/data.tsx @@ -144,7 +144,7 @@ export const taskPriorityList: DictType[] = [ code: '1', name: '不重要紧急', order: 2, - color: 'blue' + color: '#fafafa' }, { id: 0, code: '0', diff --git a/src/app/task/four/layout.tsx b/src/app/task/four/layout.tsx index 34ca3fb..ee5137f 100644 --- a/src/app/task/four/layout.tsx +++ b/src/app/task/four/layout.tsx @@ -57,7 +57,7 @@ export default function Layout({children}: { children: React.ReactNode }) {
- +
@@ -65,7 +65,7 @@ export default function Layout({children}: { children: React.ReactNode }) {
- +
@@ -73,14 +73,14 @@ export default function Layout({children}: { children: React.ReactNode }) {
- +
向上重要
{/*
{children}
*/}
- +
diff --git a/src/app/ui/task/project/TreeTable.tsx b/src/app/ui/task/project/TreeTable.tsx index a420335..9bd0ac3 100644 --- a/src/app/ui/task/project/TreeTable.tsx +++ b/src/app/ui/task/project/TreeTable.tsx @@ -1,6 +1,6 @@ 'use client' import React, {useEffect, useState} from 'react'; -import {Table} from 'antd'; +import {ConfigProvider, Table} from 'antd'; import type {TableColumnsType, TableProps} from 'antd'; import {getTaskTreeResult, taskPriorityList, taskStateList, taskTreeResult} from "@/app/lib/task/project/data"; import {DataType, ResponseVO, ResultPage} from "@/app/lib/definitions"; @@ -71,6 +71,7 @@ const rowSelection: TableRowSelection = { interface TableSearchType { search?: any + priority:string } const TreeTable: React.FC = (props) => { @@ -112,22 +113,34 @@ const TreeTable: React.FC = (props) => { } }) } + console.log('taskPriorityList.find((item)=>item.code===props.priority)?.color',props.priority,taskPriorityList.find((item)=>item.code===props.search.priority)?.color) useEffect(() => { refreshDate(); }, [props.search]); return ( <> + item.code===props.priority)?.color + /* 这里是你的组件 token */ + }, + }, + }} + > + + {/**/} {/* CheckStrictly: */} {/**/} {/**/} -
); };