🚀 Perf: [前台]:修改链接标签为a,去除文字提示
This commit is contained in:
parent
06aa2ffda6
commit
d13301f62c
@ -1,6 +1,6 @@
|
|||||||
import httpUtil from "../../../util/httpUtil";
|
import httpUtil from "../../../util/httpUtil";
|
||||||
import React from "react";
|
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 styles from "./index.module.less";
|
||||||
import IconFont from "../../../components/IconFont";
|
import IconFont from "../../../components/IconFont";
|
||||||
const { TreeNode } = Tree;
|
const { TreeNode } = Tree;
|
||||||
@ -32,12 +32,16 @@ export function renderNodeContent(item) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<span style={{ display: "inline-block" }}>
|
<React.Fragment>
|
||||||
<Tooltip placement="bottom" title={item.url}>
|
{item.type === 0 ? (
|
||||||
<span>{item.name}</span>
|
<a href={item.url} className={styles.nodeContent}>
|
||||||
</Tooltip>
|
{item.name}
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<span className={styles.nodeContent}>{item.name}</span>
|
||||||
|
)}
|
||||||
{isEdit ? btns : null}
|
{isEdit ? btns : null}
|
||||||
</span>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,8 +207,8 @@ export function onDrop(info) {
|
|||||||
}
|
}
|
||||||
httpUtil.post("/bookmark/moveNode", body).then(res => {
|
httpUtil.post("/bookmark/moveNode", body).then(res => {
|
||||||
message.success("移动完成");
|
message.success("移动完成");
|
||||||
|
updateTreeData([...treeData]);
|
||||||
});
|
});
|
||||||
updateTreeData({ treeData: [...treeData] });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -242,7 +246,7 @@ function insertToArray(item, index, arr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新节点的path信息
|
* 更新修改节点的子节点节点path信息
|
||||||
* @param {*} children 孩子数组
|
* @param {*} children 孩子数组
|
||||||
* @param {*} oldPath 旧path
|
* @param {*} oldPath 旧path
|
||||||
* @param {*} newPath 新path
|
* @param {*} newPath 新path
|
||||||
|
@ -18,12 +18,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.nodeContent {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
max-width: 70%;
|
align-items: center;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
.url {
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:global {
|
||||||
|
.ant-tree-title {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btns {
|
.btns {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user