From 0c3a0cee38e0a9a112e981735719fd3ab55c646b Mon Sep 17 00:00:00 2001 From: chenxuan Date: Mon, 17 May 2021 01:13:37 +0800 Subject: [PATCH] xxx --- project/p0/src/App.css | 38 -------------------------------------- project/p0/src/App.js | 31 +++++++++---------------------- project/p0/src/index.js | 4 ---- project/p1/read.text | 6 +++++- project/p1/src/App.js | 2 +- 5 files changed, 15 insertions(+), 66 deletions(-) delete mode 100644 project/p0/src/App.css diff --git a/project/p0/src/App.css b/project/p0/src/App.css deleted file mode 100644 index 74b5e0534..000000000 --- a/project/p0/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/project/p0/src/App.js b/project/p0/src/App.js index 378457572..542a0090f 100644 --- a/project/p0/src/App.js +++ b/project/p0/src/App.js @@ -1,25 +1,12 @@ -import logo from './logo.svg'; -import './App.css'; +import React from 'react' -function App() { - return ( -
-
- logo -

- Edit src/App.js and save to reload. -

- - Learn React - -
-
- ); +class App extends React.Component{ + render(h) { + return ( +
+

chenxuan

+
+ ) + } } - export default App; diff --git a/project/p0/src/index.js b/project/p0/src/index.js index ef2edf8ea..a4f7042ed 100644 --- a/project/p0/src/index.js +++ b/project/p0/src/index.js @@ -10,8 +10,4 @@ ReactDOM.render( , document.getElementById('root') ); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals reportWebVitals(); diff --git a/project/p1/read.text b/project/p1/read.text index cfafb968d..0f406d626 100644 --- a/project/p1/read.text +++ b/project/p1/read.text @@ -15,4 +15,8 @@ npm run start npm i -g serve 6、启动本地服务 -serve -s build \ No newline at end of file +serve -s build + +7、dangerouslySetInnerHTML +8、ReactDom.findDOMNode +9、refs \ No newline at end of file diff --git a/project/p1/src/App.js b/project/p1/src/App.js index 4bbb50e0d..447906ca2 100644 --- a/project/p1/src/App.js +++ b/project/p1/src/App.js @@ -1,6 +1,6 @@ import React from 'react'; import ReactDom from 'react-dom'; -import HeaderComponent from './components/header/index' +import HeaderComponent from './components/header/index'; class App extends React.Component{ componentDidMount(){ // ref属性