diff --git a/src/compenents/tree-category/index.tsx b/src/compenents/tree-category/index.tsx
index c199d11..a79b9cc 100644
--- a/src/compenents/tree-category/index.tsx
+++ b/src/compenents/tree-category/index.tsx
@@ -1,7 +1,6 @@
import { Button, Input, message, Tree } from "antd";
import { useState, useEffect } from "react";
import { resourceCategory } from "../../api/index";
-import type { TreeProps } from "antd/es/tree";
interface Option {
key: string | number;
@@ -64,18 +63,6 @@ export const TreeCategory = (props: PropInterface) => {
setSelectKey(selectedKeys);
};
- const onDragEnter: TreeProps["onDragEnter"] = (info) => {
- console.log(info);
- // expandedKeys 需要受控时设置
- // setExpandedKeys(info.expandedKeys)
- };
-
- const onDrop: TreeProps["onDrop"] = (info) => {
- console.log(info);
- // expandedKeys 需要受控时设置
- // setExpandedKeys(info.expandedKeys)
- };
-
return (
);
};
diff --git a/src/compenents/tree-department/index.tsx b/src/compenents/tree-department/index.tsx
index 9f616d3..0681622 100644
--- a/src/compenents/tree-department/index.tsx
+++ b/src/compenents/tree-department/index.tsx
@@ -1,7 +1,6 @@
import { Button, Input, message, Tree } from "antd";
import { useState, useEffect } from "react";
import { department } from "../../api/index";
-import type { TreeProps } from "antd/es/tree";
interface Option {
key: string | number;
@@ -56,25 +55,5 @@ export const TreeDepartment = (props: PropInterface) => {
props.onUpdate(selectedKeys);
};
- const onDragEnter: TreeProps["onDragEnter"] = (info) => {
- console.log(info);
- // expandedKeys 需要受控时设置
- // setExpandedKeys(info.expandedKeys)
- };
-
- const onDrop: TreeProps["onDrop"] = (info) => {
- console.log(info);
- // expandedKeys 需要受控时设置
- // setExpandedKeys(info.expandedKeys)
- };
-
- return (
-
- );
+ return ;
};
diff --git a/src/index.less b/src/index.less
index 7dad59b..eb97095 100644
--- a/src/index.less
+++ b/src/index.less
@@ -327,3 +327,33 @@ textarea.ant-input {
.c-gray {
color: rgba(#333333, 0.3);
}
+
+.ant-tree-treenode {
+ width: 100% !important;
+ height: 40px !important;
+ padding: 0 !important;
+ margin-bottom: 8px !important;
+ display: flex;
+ align-items: center !important;
+ &.ant-tree-treenode-selected {
+ background-color: #fff2f0 !important;
+ border-radius: 6px !important;
+ overflow: hidden;
+ }
+ &:hover {
+ border-radius: 6px !important;
+ overflow: hidden;
+ }
+ .ant-tree-node-content-wrapper-normal {
+ width: 100% !important;
+ height: 40px !important;
+ display: flex;
+ align-items: center;
+
+ }
+ .ant-tree-switcher {
+ height: 40px !important;
+ display: flex;
+ align-items: center;
+ }
+}