rebuild project

This commit is contained in:
zhandouxiaojiji committed 2020-10-14 11:39:13 +08:00
1 parent 69a284cc16
commit 84e1e376b9
9 files changed
+8 -7

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
import React, { Component } from "react";
import { DatePicker } from 'antd';
import { ipcRenderer } from 'electron';
import EventType from "../../common/EventType";
interface EditorState {
workspace: string;
}
export default class Editor extends Component {
state: EditorState = {
workspace: ''
}
componentDidMount() {
ipcRenderer.on(EventType.MAIN_OPEN_FILE, (event: any, path: any) => {
console.log("on", event, path);
})
}
render() {
return (
<DatePicker />
)
}
};
+52
View File
@@ -0,0 +1,52 @@
import * as React from 'react';
import GGEditor, { Mind, RegisterNode } from 'gg-editor';
import { MindData } from 'gg-editor/lib/common/interfaces';
const data: MindData = {
id: "1",
label: 'Central Topic111',
children: [
{
id: "2",
label: 'Main Topic 1',
},
{
id: "3",
label: 'Main Topic 2',
},
{
id: "4",
label: 'Main Topic 3',
},
],
};
export default class Hello extends React.Component {
render() {
return (
<GGEditor style={{ background: "#242424" }}>
<Mind
style={{ width: 500, height: 500 }}
data={data}
graphConfig={{ defaultNode: { type: 'customNode' } }}
/>
<RegisterNode
name="customNode"
config={{
getCustomConfig(model: any) {
return {
wrapperStyle: {
fill: '#000000',
},
};
},
}}
extend="bizFlowNode"
/>
</GGEditor>
);
}
}
function getExclamationMarks(numChars: number) {
return Array(numChars + 1).join('!');
}
+4
View File
@@ -0,0 +1,4 @@
body {
background-color: #242424;
padding: 0px;
}
+10
View File
@@ -0,0 +1,10 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import Editor from "./Editor";
import 'antd/dist/antd.dark.css';
import './index.css';
ReactDOM.render(
<Editor />,
document.getElementById('root') as HTMLElement
);