- 博客(4)
- 收藏
- 关注
原创 react 在点击查看的时候禁用整个表单,前提新增,编辑,查看用的是一个表单
在这个表单render下添加let { getFieldDecorator } = this.props.form; if (this.props.disabled) { getFieldDecorator = (...rest) => { return element => { let NewElement = React.cloneElement(e...
2019-05-14 16:17:28 4289 1
原创 高阶组件 wrappedComponentRef 获取组件的引用
父调子 有这句话的时候 继续封装了一层 const Contractdef = Form.create({ name: 'def ’ })(def );class abc extends Component { constructor(props) { super(props); this.state = { // state设置一个id id: '' }...
2019-05-07 10:33:50 15414
原创 react阶段性总结
1. React 的定义react 是一种以数据为驱动的大视图,提供了一种高性能,组件化的技术解决方案。1. 数据为驱动:在 react 中任何视图的改变,都来源于 state 或 props 的改变所引起的class template extends Component { constructor(props) { super(props); this.state = { /...
2019-05-05 19:37:34 348
原创 react合并单元格
举个例子,假如我们要合并2019年这一年的年份/** * 合并单元格 * @param text 当前的值 * @param array 当前这一行的数据 * @param columns 当前的key 也就是year * @returns {number} */ // 定义一个变量,因为初始化的时候第一行是个空let temp = {};let tempNum...
2019-05-05 15:15:20 1469
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人