![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react+ant
Amen-
这个作者很懒,什么都没留下…
展开
-
React 注册模块报错Missing message: "menu.xxx" for locale: "zh-CN", using default message as fallback
刚入react的新手今天新增了一个js模块在config/router.config.js里面配置路由 { path: '/teacher/TeacherInformation', name: 'teacherInformation', hideInMenu: true, component: './TeacherMan...原创 2019-06-27 17:37:53 · 15989 阅读 · 0 评论 -
react+ant -- table fixed 中间留白
问题:表格太多列,导致有滑动条,就希望固定头跟尾,方便用户操作 ,但是加了 fixed属性之后,头跟尾是固定了,但是中间有很多留白原因:表格每一列都有width属性,width 加起来的总和应该跟scroll={{x: 500}}中的宽度对上,或者scroll就不要写成固定的。放一张官网的解决办法官网地址:https://ant.design/components/tab...原创 2019-07-14 14:37:58 · 2386 阅读 · 0 评论 -
react 连续调用了两次this.setState,但是只会引发一次更新生命周期render()只执行一次
问题:因为业务需求,一个方法里需要多次调用setState(也可能是我自己菜,我觉得这些set不能整合到一块),setState了很多次,然后render()只调用了一次原因:React会将多个this.setState产生的修改放在一个队列里,缓一缓,攒在一起,觉得差不多了再引发一次更新过程。react为了提高整体的渲染性能,会将一次渲染周期中的state进行合并,在这个渲染...原创 2019-07-30 15:03:27 · 11238 阅读 · 0 评论 -
React.createElement: type is invalid -- expected a string (for built-in components) or a class..
问题:Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your co...原创 2019-08-02 11:06:22 · 25237 阅读 · 0 评论