From 35ea9e88778858c403ffd6fedbfcd5769eea41b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Wed, 15 Mar 2023 11:00:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=88=86=E7=B1=BB=E3=80=81?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compenents/tree-category/index.tsx | 11 ++++++++++- src/compenents/tree-department/index.tsx | 11 ++++++++++- src/index.less | 4 ++++ src/pages/department/index.tsx | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/compenents/tree-category/index.tsx b/src/compenents/tree-category/index.tsx index fdc9209..c5a3e32 100644 --- a/src/compenents/tree-category/index.tsx +++ b/src/compenents/tree-category/index.tsx @@ -67,6 +67,15 @@ export const TreeCategory = (props: PropInterface) => { setSelectKey(selectedKeys); }; + const onExpand = (selectedKeys: any, info: any) => { + let label = "全部" + props.text; + if (info) { + label = info.node.title; + } + props.onUpdate(selectedKeys, label); + setSelectKey(selectedKeys); + }; + return (
{ > 全部{props.text}
- +
); }; diff --git a/src/compenents/tree-department/index.tsx b/src/compenents/tree-department/index.tsx index 66600bd..c3093bb 100644 --- a/src/compenents/tree-department/index.tsx +++ b/src/compenents/tree-department/index.tsx @@ -68,6 +68,15 @@ export const TreeDepartment = (props: PropInterface) => { setSelectKey(selectedKeys); }; + const onExpand = (selectedKeys: any, info: any) => { + let label = "全部" + props.text; + if (info) { + label = info.node.title; + } + props.onUpdate(selectedKeys, label); + setSelectKey(selectedKeys); + }; + return (
{ > 全部{props.text}
- +
); }; diff --git a/src/index.less b/src/index.less index ee31df0..996ed82 100644 --- a/src/index.less +++ b/src/index.less @@ -430,6 +430,10 @@ textarea.ant-input { left: 0; bottom: 0; } +.ant-tree-switcher_open::after, +.ant-tree-switcher_close::after { + z-index: 0; +} .ant-modal-confirm-btns > .ant-btn-default:hover { color: #ff4d4f !important; diff --git a/src/pages/department/index.tsx b/src/pages/department/index.tsx index 017a2e0..8e914d3 100644 --- a/src/pages/department/index.tsx +++ b/src/pages/department/index.tsx @@ -37,9 +37,9 @@ export const DepartmentPage: React.FC = () => { const onSelect = (selectedKeys: any, info: any) => { setSelectKey(selectedKeys); - console.log(selectedKeys); }; + const through = (p: string) => { if (!permisssions) { return false;