摘要: <Row gutter={12}> <Col span={12}> <Form.Item label="活动结束时间"> {getFieldDecorator('endTimeLong', { initialValue: [moment(popupByIdDetail.endTimeLong)], 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(56) 评论(0) 推荐(0)
摘要: <Row gutter={12}> <Col span={12}> <Form.Item label="活动开始时间"> {getFieldDecorator('startTimeLong', { initialValue: popupByIdDetail.startTimeLong, rules: 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(56) 评论(0) 推荐(0)
摘要: // 父组件 import React from 'react' import Son from './son' import { Button } from 'antd' class Father extends React.Component { child: any constructor(p 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(66) 评论(0) 推荐(0)
摘要: import React from 'react' import Son from './son' class Father extends React.Component { constructor(props) { super(props) } state = { info: '父组件', } 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(37) 评论(0) 推荐(0)
摘要: import { Upload, message, Button, Icon } from 'antd'; const props = { name: 'file', action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', header 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(143) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(18) 评论(0) 推荐(0)
摘要: componentWillReceiveProps componentWillReceiveProps# void componentWillReceiveProps( object nextProps ) 当props发生变化时执行,初始化render时不执行,在这个回调函数里面, 你可以根据属性 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(60) 评论(0) 推荐(0)
摘要: const name = 'Josh Perez';const element = <h1>Hello, {name}</h1>; ReactDOM.render( element, document.getElementById('root') ); jsx语法是个表达式 可以直接声明变量 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(28) 评论(0) 推荐(0)
摘要: ReactDOM.render( <h1>Hello, world!</h1>, document.getElementById('root'); 它将在页面上展示一个 “Hello, world!” 的标题。 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(26) 评论(0) 推荐(0)
摘要: 什么是组件? 官方定义:将一些简短、独立的代码片段组合成复杂的 UI 界面,这些代码片段被称作“组件”。 解读:我们可以理解为能够组成一个UI界面的每一个独立的代码片段,例如表单的代码集合,轮播图的代码集合,讲这些能够构成特定功能的代码集合我们称之为组件。 React.component子类 我们以 阅读全文
posted @ 2022-07-23 22:31 前端导师歌谣 阅读(44) 评论(0) 推荐(0)