|
|
|
@ -16,18 +16,16 @@ export class ContentComponent extends React.Component<{ store?: TopPanelStore; }
|
|
|
|
|
//添加新文件
|
|
|
|
|
handleAddNewFile = async () =>
|
|
|
|
|
{
|
|
|
|
|
let res = await (FileServer.GetInstance() as FileServer).AddNewFile();
|
|
|
|
|
if (res)
|
|
|
|
|
{
|
|
|
|
|
this.props.store.openMain = false;
|
|
|
|
|
this.props.store.editoring = true;
|
|
|
|
|
}
|
|
|
|
|
await (FileServer.GetInstance() as FileServer).AddNewFile();
|
|
|
|
|
this.props.store.openMain = false;
|
|
|
|
|
this.props.store.editoring = true;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
handleOpenFile = async (fid: string) =>
|
|
|
|
|
{
|
|
|
|
|
await (FileServer.GetInstance() as FileServer).OpenFile(fid);
|
|
|
|
|
this.props.store.openMain = false;
|
|
|
|
|
this.props.store.editoring = true;
|
|
|
|
|
(FileServer.GetInstance() as FileServer).OpenFile(fid);
|
|
|
|
|
};
|
|
|
|
|
async componentDidMount()
|
|
|
|
|
{
|
|
|
|
|