摘要: 路由组件与一般组件 1.写法不同: 一般组件:<Demo/> 路由组件:<Route path="/demo" component={Demo}/> 2.存放位置不同: 一般组件:components 路由组件:pages 3.接收到的props不同: 一般组件:写组件标签时传递了什么,就能收到什么 阅读全文
posted @ 2021-04-30 10:16 大海啊都是水啊水 阅读(150) 评论(0) 推荐(0)
摘要: 1.明确好界面中的导航区、展示区 2.导航区的a标签改为Link标签 <Link to="/xxxxx">Demo</Link> 3.展示区写Route标签进行路径的匹配 <Route path='/xxxx' component={Demo}/> 4.<App>的最外侧包裹了一个<BrowserR 阅读全文
posted @ 2021-04-30 10:15 大海啊都是水啊水 阅读(137) 评论(0) 推荐(0)
摘要: 印记中文:https://docschina.org/ MDN:https://developer.mozilla.org/zh-CN/ Babel中文网:https://www.babeljs.cn/ Request.js:https://github.com/octokit/request.js 阅读全文
posted @ 2021-04-29 17:30 大海啊都是水啊水 阅读(114) 评论(0) 推荐(0)
摘要: //记得引入use/think/Db; public function change_limit_switch(){ $sql='update elephone_reservation set limit_switch = replace(limit_switch,0,1)'; $res=Db::e 阅读全文
posted @ 2021-04-28 13:28 大海啊都是水啊水 阅读(281) 评论(0) 推荐(0)
摘要: <script type="text/babel"> //创建组件 class Demo extends React.Component{ state = {isHot:false} showInfo = ()=>{ const {input1} = this alert(input1.value) 阅读全文
posted @ 2021-04-21 10:33 大海啊都是水啊水 阅读(257) 评论(0) 推荐(0)
摘要: 1.字符串形式(官方以不推荐使用) <script type="text/babel"> //创建组件 class Demo extends React.Component{ //展示左侧输入框的数据 showData = ()=>{ const {input1} = this.refs alert 阅读全文
posted @ 2021-04-21 10:32 大海啊都是水啊水 阅读(244) 评论(0) 推荐(0)
摘要: <script type="text/babel"> //创建组件 function Person (props){ const {name,age,sex} = props return ( <ul> <li>姓名:{name}</li> <li>性别:{sex}</li> <li>年龄:{age 阅读全文
posted @ 2021-04-21 09:30 大海啊都是水啊水 阅读(600) 评论(0) 推荐(0)
摘要: <script type="text/babel"> //创建组件 class Person extends React.Component{ render(){ // console.log(this); const {name,age,sex} = this.props //props是只读的 阅读全文
posted @ 2021-04-21 09:29 大海啊都是水啊水 阅读(300) 评论(0) 推荐(0)
摘要: <script type="text/babel"> //1.创建组件 class Weather extends React.Component{ //构造器调用几次? ———— 1次 constructor(props){ console.log('constructor'); super(pr 阅读全文
posted @ 2021-04-21 09:27 大海啊都是水啊水 阅读(106) 评论(0) 推荐(0)
摘要: <script type="text/javascript" > let arr1 = [1,3,5,7,9] let arr2 = [2,4,6,8,10] console.log(...arr1); //展开一个数组 let arr3 = [...arr1,...arr2]//连接数组 cons 阅读全文
posted @ 2021-04-21 09:24 大海啊都是水啊水 阅读(75) 评论(0) 推荐(0)