
react
fang_ze_zhang
这个作者很懒,什么都没留下…
展开
-
使用webstrom,创建react模板
react 模板使用webstrom,增加react文件模板:import React, {Component} from 'react';export default class Xxx extends Component { constructor(props) { super(props); this.state = {}; }...原创 2018-08-20 10:53:44 · 2634 阅读 · 1 评论 -
运算符&&和||
与运算符&&在JS中,true && expression总是返回expression,而false && expression总是返回false,因此,如果条件是true,&&右侧的元素就会被渲染,如果是false,React会忽略并跳过它。或运算符||系统先判断A表达式的布尔值,是真是假。如果为真,直接返回A。如果为假...原创 2018-08-20 11:27:40 · 2037 阅读 · 0 评论 -
react 组件内部不能通过this.props.key和this.props.ref获取key和ref。
react 组件内部不能通过this.props.key和this.props.ref获取key和ref。原创 2018-08-20 11:37:35 · 1725 阅读 · 0 评论 -
antd-日历组件,前后禁止选择,只能选中间一部分
antd-日历组件,前后禁止选择,只能选中间一部分:dateDisabledDate(current) { // 需求有效期的禁止选择时间 if (this.state.sailingtimeValue != null && this.state.sailingtimeValue.length != 0) { return curren...原创 2018-08-20 11:46:22 · 4766 阅读 · 1 评论 -
antd日期选择组件,添加value后导致无法点击下一年和下一月
原因:表单监听了关闭事件,执行了setState,若是给closeFloatingLayer增加延时就可看出来antd数据的变化。原创 2018-08-20 11:51:46 · 3292 阅读 · 3 评论 -
moment.js可以通过 .format()方法将时间变成字符串
moment.js可以通过 .format()方法将时间变成字符串:moment(moment().add(1, 'M')).format(dateFormat)原创 2018-08-20 11:53:36 · 20922 阅读 · 3 评论