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