随笔分类 - 前端-工作篇-react工作
前端-react工作
摘要:1接口调用 /*调用接口*/ created() { /*动态渲染content_type接口*/ getAction("/dict/list",{ dict_code:"content_type" }).then(res=>{ this.content_type=res.data }) /*动态渲
阅读全文
摘要:import React, { Component } from 'react'; class List extends Component { constructor(props) { super(props); } render() { return <div>1111</div>; } } e
阅读全文
摘要:<div style={{ textAlign: 'center' }}> <Button type="primary" style={{ marginRight: '10px' }}> 保存 </Button> <Button>取消</Button> <Button type="primary"
阅读全文
摘要:boothActivityCode: this.props.location.query.code || '',
阅读全文
摘要:this.setState({ pageIndex: 1, pageSize: 10, });
阅读全文
摘要:Uncaught Error: Reducer "index" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return
阅读全文
摘要:<Col span={8} key={index}> <Form.Item label={item.label} {...formItemLayout}> {getFieldDecorator(`${item.paramsName}`, {})( item.isRangePicker ? ( <Ra
阅读全文
摘要:<p> {moment(boothDetails.startTime).format('YYYY-MM-DD')}到 {moment(boothDetails.endTime).format('YYYY-MM-DD')} </p>
阅读全文
摘要:Warning: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key. rowKey="code" pageIndex={pageIndex} pageSize={
阅读全文
摘要:ilter() 方法创建一个新的数组,新数组中的元素是通过检查指定数组中符合条件的所有元素。 注意: filter() 不会对空数组进行检测。 注意: filter() 不会改变原始数组。
阅读全文
摘要:{ title: '状态', dataIndex: 'status', render: (text, row) => { let arr = ['', '未开始', '进行中', '已结束', '已作废']; return <span>{arr[text]}</span>; }, },
阅读全文
摘要:react生命周期1.1.constructor() constructor()中完成了React数据的初始化,它接受两个参数 :props和context,当想在函数内部使用这两个参数时 ,需使用super()传入这两个参数。 注意:只要使用了constructor()就必须写super() ,否
阅读全文
摘要:{ title: '状态', dataIndex: 'status', render: (text, row) => { let arr = ['', '未开始', '进行中', '已结束', '已作废']; return <span>{arr[text]}</span>; }, },
阅读全文
摘要:componentWillReceiveProps componentWillReceiveProps# void componentWillReceiveProps( object nextProps ) 当props发生变化时执行,初始化render时不执行,在这个回调函数里面, 你可以根据属性
阅读全文
摘要:{getFieldDecorator('activityTimeStamp', { rules: [{ required: true, message: '请选择活动时间' }], initialValue: [ moment(updateDataSource.startTime), moment(
阅读全文
摘要:this.props.form.validateFieldsAndScroll((err, values) => {} values可以对应表单的值
阅读全文
摘要:react项目中接口未能执行从dva.js上面找问题
阅读全文