摘要: ref的作用在于父组件取到子组件的所有state内容。 在父组件中 编写如下: 1. public child: any; 类中定义child,用于存放子组件的作用域 2. 绑定子组件作用域 public onRef(ref: any) { this.child = ref } 3. 子组件中绑定r 阅读全文
posted @ 2019-05-24 10:40 Denvue 阅读(5212) 评论(0) 推荐(0) 编辑
摘要: import { Row, Col, Select, Table, Input, Popconfirm, Button, Form } from 'antd'; import * as React from 'react' const FormItem = Form.Item; const EditableContext = React.createContext({}); const Edi... 阅读全文
posted @ 2019-05-21 16:59 Denvue 阅读(3215) 评论(1) 推荐(0) 编辑
摘要: 页面上的png格式的图片像素很大,通过css将宽高限制,缩小显示图片后,在chrome中会显示正常, 但是在IE 浏览器下图片会出现锯齿,导致失真。 解决方法就是按照显示的大小将图片修改成对应或相近的大小,这样看起来 图片就不会失真 。 阅读全文
posted @ 2019-04-16 17:28 Denvue 阅读(954) 评论(0) 推荐(0) 编辑
摘要: {Object.keys(this.props.appearanceNode).map(key => ( <Form.Item {...formItemLayout} key={key}> <div key={key}>{this.props.appearanceNode[key]} </div> 阅读全文
posted @ 2019-03-19 14:11 Denvue 阅读(6769) 评论(0) 推荐(0) 编辑