feat:span.title划过显示filePath
This commit is contained in:
parent
8e07b42789
commit
c58eca1d9a
|
@ -52,7 +52,7 @@ function generateChildList(fileList) {
|
||||||
}
|
}
|
||||||
result.push({
|
result.push({
|
||||||
"key": filePath,
|
"key": filePath,
|
||||||
"title": titleExtended(fileName,dirFlag),
|
"title": titleExtended(fileName,dirFlag,filePath),
|
||||||
"icon": dirFlag ? <FolderOutlined/> : fileName.endsWith(".md") ? <FileMarkdownOutlined/> : <FileOutlined/>,
|
"icon": dirFlag ? <FolderOutlined/> : fileName.endsWith(".md") ? <FileMarkdownOutlined/> : <FileOutlined/>,
|
||||||
"dirFlag": dirFlag,
|
"dirFlag": dirFlag,
|
||||||
"children": childListM
|
"children": childListM
|
||||||
|
@ -61,7 +61,7 @@ function generateChildList(fileList) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
const titleExtended = (fileName, dirFlag) => {
|
const titleExtended = (fileName, dirFlag,filePath) => {
|
||||||
|
|
||||||
const confirm = (e) => {
|
const confirm = (e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
@ -71,7 +71,7 @@ const titleExtended = (fileName, dirFlag) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
message.error('Click on No');
|
message.error('Click on No');
|
||||||
};
|
};
|
||||||
return <span >{fileName}
|
return <span title = {filePath}>{fileName}
|
||||||
{dirFlag && <span style={{float: "right"}}>
|
{dirFlag && <span style={{float: "right"}}>
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title="更新当前目录"
|
title="更新当前目录"
|
||||||
|
@ -114,7 +114,8 @@ const flushTree = (fileDirDate) => {
|
||||||
}
|
}
|
||||||
defaultValueStateSet.push({
|
defaultValueStateSet.push({
|
||||||
"key": filePath,
|
"key": filePath,
|
||||||
"title": titleExtended(fileName.substring(fileName.lastIndexOf("/")+1), dirFlag),
|
// 修改属性后此处也需要修改
|
||||||
|
"title": titleExtended(fileName.substring(fileName.lastIndexOf("/")+1), dirFlag,filePath),
|
||||||
"icon": <FolderOutlined/>,
|
"icon": <FolderOutlined/>,
|
||||||
"dirFlag": dirFlag,
|
"dirFlag": dirFlag,
|
||||||
"children": childListM
|
"children": childListM
|
||||||
|
|
Loading…
Reference in New Issue