知识库以及文件重命名、移动、删除
This commit is contained in:
@@ -34,6 +34,10 @@ export default function FileLibPage() {
|
||||
readFileLibDatabase(param.page, 10000, param.keyword, parentId)
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
reload()
|
||||
}, [])
|
||||
|
||||
// Delete
|
||||
const { delShow, idRef, close, delConfirm } = useDelete();
|
||||
|
||||
@@ -62,12 +66,12 @@ export default function FileLibPage() {
|
||||
const backFolder = (parentId, index) => {
|
||||
setParentId(parentId)
|
||||
reload();
|
||||
if(index != -1){
|
||||
titleArray.splice(index)
|
||||
if(index == -1){
|
||||
setTitleArray([])
|
||||
}else if(index == (titleArray.length - 1)){
|
||||
return;
|
||||
}else{
|
||||
setTitleArray([])
|
||||
titleArray.splice(index+1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +112,7 @@ export default function FileLibPage() {
|
||||
{
|
||||
titleArray.map((title, index) => (
|
||||
<div className={"title-item"} key={title}>
|
||||
<span>{index == (titleArray.length - 1)? ">" : ""}</span>
|
||||
<span>{index <= (titleArray.length - 1)? ">" : ""}</span>
|
||||
<label onClick={()=>backFolder(title.id, index)}>{title.name}</label>
|
||||
</div>
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user