From d0b332c53ccb4248042fddd992d8a049f14d524a Mon Sep 17 00:00:00 2001 From: chenxuan Date: Fri, 12 Apr 2024 14:01:58 +0800 Subject: [PATCH] no message --- demo/高阶函数/0/src/App1.js | 2 +- demo/高阶函数/0/src/App2.js | 2 +- demo/高阶函数/0/src/index.css | 13 ++++++++----- demo/高阶函数/0/src/index.js | 7 ++++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/demo/高阶函数/0/src/App1.js b/demo/高阶函数/0/src/App1.js index 094dffe87..645fe57b7 100644 --- a/demo/高阶函数/0/src/App1.js +++ b/demo/高阶函数/0/src/App1.js @@ -15,7 +15,7 @@ class App extends React.Component { } render() { return ( -
+

当前组件state:{this.state.age}

props:{this.props.title}

props:{this.props.name}

diff --git a/demo/高阶函数/0/src/App2.js b/demo/高阶函数/0/src/App2.js index a462e2081..7ca6032e6 100644 --- a/demo/高阶函数/0/src/App2.js +++ b/demo/高阶函数/0/src/App2.js @@ -13,7 +13,7 @@ class App extends React.Component { } render() { return ( -
+
{/* */}

{this.props.title}

{this.props.name}

diff --git a/demo/高阶函数/0/src/index.css b/demo/高阶函数/0/src/index.css index ec2585e8c..094867f81 100644 --- a/demo/高阶函数/0/src/index.css +++ b/demo/高阶函数/0/src/index.css @@ -6,8 +6,11 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} +.app2, +.app1{ + box-sizing:border-box; + width: 500px; + border: 1px solid red; + padding: 24px; + margin: 24px 0 24px 48px; +} \ No newline at end of file diff --git a/demo/高阶函数/0/src/index.js b/demo/高阶函数/0/src/index.js index 84f59ea11..59eaec3b2 100644 --- a/demo/高阶函数/0/src/index.js +++ b/demo/高阶函数/0/src/index.js @@ -1,14 +1,15 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; -// import App from './App2'; -import App from './App1'; +import App1 from './App1'; +import App2 from './App2'; import reportWebVitals from './reportWebVitals'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( - + + ) reportWebVitals();