diff --git a/front/src/pages/manage/OverView/function.js b/front/src/pages/manage/OverView/function.js index 3099092..4400391 100644 --- a/front/src/pages/manage/OverView/function.js +++ b/front/src/pages/manage/OverView/function.js @@ -1,6 +1,6 @@ import httpUtil from "../../../util/httpUtil"; import React from "react"; -import { Modal, Button, Tooltip, Tree, message } from "antd"; +import { Modal, Button, Tree, message } from "antd"; import styles from "./index.module.less"; import IconFont from "../../../components/IconFont"; const { TreeNode } = Tree; @@ -32,12 +32,16 @@ export function renderNodeContent(item) { ); return ( - - - {item.name} - + + {item.type === 0 ? ( + + {item.name} + + ) : ( + {item.name} + )} {isEdit ? btns : null} - + ); } @@ -203,8 +207,8 @@ export function onDrop(info) { } httpUtil.post("/bookmark/moveNode", body).then(res => { message.success("移动完成"); + updateTreeData([...treeData]); }); - updateTreeData({ treeData: [...treeData] }); } /** @@ -242,7 +246,7 @@ function insertToArray(item, index, arr) { } /** - * 更新节点的path信息 + * 更新修改节点的子节点节点path信息 * @param {*} children 孩子数组 * @param {*} oldPath 旧path * @param {*} newPath 新path diff --git a/front/src/pages/manage/OverView/index.module.less b/front/src/pages/manage/OverView/index.module.less index ddcf867..344b9a9 100644 --- a/front/src/pages/manage/OverView/index.module.less +++ b/front/src/pages/manage/OverView/index.module.less @@ -18,12 +18,25 @@ } } - .title { + .nodeContent { display: inline-block; - max-width: 70%; + align-items: center; margin-right: 1em; overflow-x: hidden; text-overflow: ellipsis; + + .url { + display: inline-block; + min-width: 3em; + } + } + + :global { + .ant-tree-title { + display: inline-flex; + align-items: center; + width: 100%; + } } .btns {