摘要: - 1. 通过 ref <Child ref="demo" /> 给子组件添加ref属性 在父组件使用 `this.refs.demo.state.xxx` 来获取子组件state里面的xxx的值 使用 `this.refs.demo.dosomthing()` 来调用子组件的dosomthing( 阅读全文
posted @ 2020-06-17 16:28 Howar丶张 阅读(11709) 评论(0) 推荐(1)
摘要: 用户输入url到展示内容,经历了什么 1. 用户在地址栏输入域名,服务器根据域名查找IP,向Ip发起请求 2. 浏览器获得并解析服务器返回的内容 3. 浏览器加载HTML文件,以及引用外部文件,资源,图片 4. js渲染引擎从上到下解析DOM文档生成DOM节点树 5. 构建CSS树,加载解析样式生成 阅读全文
posted @ 2020-05-29 19:33 Howar丶张 阅读(128) 评论(0) 推荐(0)
摘要: JS 基本用法 typeof 返回变量类型 var a = 33 console.log(typeof a) // number instanceof A instanceof B 检测B.prototype是否存在于A的原型链上。 判断一个对象是不是另外一个对象的实例 简单用法: function 阅读全文
posted @ 2020-05-28 18:28 Howar丶张 阅读(172) 评论(0) 推荐(0)
摘要: 分割线 import React,{forwardRef,Ref,UseRef} from 'react' import {Form,Input,Modal} from 'antd' 重要代码 需要用下列包括起来 const WrappedForm = Form.create({})(forward 阅读全文
posted @ 2020-05-13 11:41 Howar丶张 阅读(7099) 评论(0) 推荐(0)
摘要: 父组件 import React,{useRef} from 'react' import Child from './child' function ComponentA (){ const dataobj ={ pdata1:1 } const childUseAMethods=()= { // 阅读全文
posted @ 2020-05-13 11:12 Howar丶张 阅读(1290) 评论(0) 推荐(0)
摘要: 该文章转自https://blog.csdn.net/mf_717714/article/details/82494376 ,很好的解释了.如有侵权,联系删除,谢谢 阅读全文
posted @ 2020-04-10 11:14 Howar丶张 阅读(2358) 评论(0) 推荐(0)
摘要: 栗子: 请求回来的数据格式为 : data:[ { id:1, time: '2020-08-08', value:'搜索内容1', }, { id:2, time: '2020-08-18', value:'搜索内容12', }, { id:3, time: '2020-08-28', value 阅读全文
posted @ 2020-04-02 18:53 Howar丶张 阅读(1732) 评论(0) 推荐(0)
摘要: 文章转自 == https://www.cnblogs.com/yesu/p/9546458.html 如有侵权,联系删除,谢谢! 阅读全文
posted @ 2020-04-01 17:22 Howar丶张 阅读(349) 评论(0) 推荐(0)