新建行为树

This commit is contained in:
zhandouxiaojiji committed 2020-11-05 21:22:14 +08:00
1 parent 4bb083f736
commit 5653ff7ff6
8 files changed
+73 -11

No files matched your search

+8
View File
@@ -2,6 +2,8 @@ import React, { Component } from "react";
import { Menu, Input } from "antd";
import * as fs from 'fs';
import * as path from 'path';
import { ipcRenderer } from "electron";
import MainEventType from "../common/MainEventType";
const { Search } = Input;
@@ -33,6 +35,12 @@ export default class Properties extends Component<PropertiesProps> {
}
componentDidMount() {
ipcRenderer.on(MainEventType.CREATE_TREE, (event: any, path: string) => {
console.log("on Create tree", path);
this.props.onOpenTree(path);
this.forceUpdate();
});
var workspace = this.props.workspace;
if (workspace == '') {
return;