From 9374464186382e50c1bd641a13cece2b2c319795 Mon Sep 17 00:00:00 2001 From: MrKBear Date: Thu, 13 Jan 2022 17:09:14 +0800 Subject: [PATCH] Add Entry --- source/Page/Entry/Entry.scss | 0 source/Page/Entry/Entry.tsx | 20 ++++++++++++++++++++ source/Page/Laboratory/Laboratory.tsx | 4 ++-- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 source/Page/Entry/Entry.scss create mode 100644 source/Page/Entry/Entry.tsx diff --git a/source/Page/Entry/Entry.scss b/source/Page/Entry/Entry.scss new file mode 100644 index 0000000..e69de29 diff --git a/source/Page/Entry/Entry.tsx b/source/Page/Entry/Entry.tsx new file mode 100644 index 0000000..25e4027 --- /dev/null +++ b/source/Page/Entry/Entry.tsx @@ -0,0 +1,20 @@ +import { Component, ReactNode, StrictMode } from "react"; +import { render } from "react-dom"; + +class Entry extends Component<{}, {}> { + + render(): ReactNode { + return ( + + {this.props.children} + + ); + } + + /** + * 渲染组件 + * @param component 需要渲染的组件 + */ + public static renderComponent(component: new () => Component) { + } +} \ No newline at end of file diff --git a/source/Page/Laboratory/Laboratory.tsx b/source/Page/Laboratory/Laboratory.tsx index c39a701..7aa3df4 100644 --- a/source/Page/Laboratory/Laboratory.tsx +++ b/source/Page/Laboratory/Laboratory.tsx @@ -1,4 +1,4 @@ -import { Component, ReactNode } from "react"; +import { Component, ReactNode, StrictMode } from "react"; import { render } from "react-dom"; import { Group } from "@Model/Group"; import "./Laboratory.scss"; @@ -13,7 +13,7 @@ class Test extends Component { } render( - , + , document.getElementById("root") );