From f543b34c351fb56152872a807c610537333299cc Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Mon, 20 Jul 2020 11:42:28 +0800 Subject: [PATCH] update Former-commit-id: 87a24c717e31a0a3ecc94d51549df55aa77f413d Former-commit-id: 66f688398a0509e9eed53bff074af59164d04e9d --- labs/ReactWithoutWebPack/wwwroot/index.html | 75 ++------------------- labs/ReactWithoutWebPack/wwwroot/js/home.js | 58 ++++++++++++++++ labs/ReactWithoutWebPack/wwwroot/js/site.js | 2 - 3 files changed, 62 insertions(+), 73 deletions(-) create mode 100644 labs/ReactWithoutWebPack/wwwroot/js/home.js delete mode 100644 labs/ReactWithoutWebPack/wwwroot/js/site.js diff --git a/labs/ReactWithoutWebPack/wwwroot/index.html b/labs/ReactWithoutWebPack/wwwroot/index.html index 2846d0da..76d7ec1e 100644 --- a/labs/ReactWithoutWebPack/wwwroot/index.html +++ b/labs/ReactWithoutWebPack/wwwroot/index.html @@ -1,10 +1,12 @@  + +
@@ -13,76 +15,7 @@ - - + + \ No newline at end of file diff --git a/labs/ReactWithoutWebPack/wwwroot/js/home.js b/labs/ReactWithoutWebPack/wwwroot/js/home.js new file mode 100644 index 00000000..952d4210 --- /dev/null +++ b/labs/ReactWithoutWebPack/wwwroot/js/home.js @@ -0,0 +1,58 @@ +const Component = React.Component; + const Router = window.ReactRouterDOM.HashRouter; + const Route = window.ReactRouterDOM.Route; + const Link = window.ReactRouterDOM.Link; + const Prompt = window.ReactRouterDOM.Prompt; + const Switch = window.ReactRouterDOM.Switch; + const Redirect = window.ReactRouterDOM.Redirect; + //const createHashHistory=win + //antd + const Button = antd.Button; + + class Home extends Component { + render() { + return ( +
+

+ +

+
+ ) + } + } + + const About = () => ( +
+

About

+
+ ) + + const Product = () => ( +
+

Product

+
+ ) + + class App extends Component { + render() { + return ( + +
+ Home + About + Product +
+ + + +
+
+ ); + } + } + + ReactDOM.render( + + , + document.getElementById('app') + ); \ No newline at end of file diff --git a/labs/ReactWithoutWebPack/wwwroot/js/site.js b/labs/ReactWithoutWebPack/wwwroot/js/site.js deleted file mode 100644 index c4e44de3..00000000 --- a/labs/ReactWithoutWebPack/wwwroot/js/site.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict'; -