![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前端学习
谢邀
这个作者很懒,什么都没留下…
展开
-
[React] Form数字校验功能实现
难点:1.type = numberInput 的 值默认为字符串 需要通过transform方法来转换成数值,不然会一直不是数值2.控制数值大小实现效果原创 2021-01-26 11:42:30 · 806 阅读 · 0 评论 -
[React] 长文本展开收起功能实现
长文本展开收起功能实现设置state变量state= { isShowExpand:true,}state变量触发方法handleUp = () =>{ const{isShowExpand} = this.state; this.setState({ isShowExpand:!isShowExpand });}是否触发expand/fold组件 ...原创 2020-04-10 14:05:30 · 2436 阅读 · 3 评论 -
[React] 父组件获取子组件数据
父组件获取子组件数据,调用方法父组件代码片段// 父组件调用子组件方法,传递thisonRef = (ref) =>{ this.child = ref;};addDrawer=() =>{ // 此处调用子组件的initTags方法 this.child.initTags();} ....render() {{/* 子组件调用方法 */}<Lis...原创 2020-04-10 13:31:03 · 440 阅读 · 0 评论