19 lines
552 B
React
19 lines
552 B
React
|
import React, {useRef, useState} from 'react';
|
||
|
import {Button, Input, Menu, Modal} from 'antd';
|
||
|
import {readDir} from "../../../utils/File";
|
||
|
import {nextDirAdd} from "../../../redux/dirMessage_reducer";
|
||
|
import {useDispatch} from "react-redux";
|
||
|
|
||
|
const RefreshDir = (prop) => {
|
||
|
console.log("prop",prop)
|
||
|
const dispatch = useDispatch()
|
||
|
const refreshDir = () => {
|
||
|
prop.refreshDir(prop.filePath)
|
||
|
prop.closeMenu()
|
||
|
};
|
||
|
|
||
|
return (
|
||
|
<span onClick={refreshDir}>更新目录</span>
|
||
|
);
|
||
|
};
|
||
|
export default RefreshDir;
|