摘要: https://segmentfault.com/a/1190000007062464?utm_source=sf-related 阅读全文
posted @ 2020-07-22 17:14 小魏code 阅读(172) 评论(0) 推荐(0)
摘要: 有时候,出于某种目的,需要将数组转化成对象,一个简单快速的方法是就使用展开运算符号(...): var fruits = [“banana”, “apple”, “orange”, “watermelon”]; var fruitsObj = { …fruits }; console.log(fru 阅读全文
posted @ 2020-07-21 17:28 小魏code 阅读(929) 评论(0) 推荐(0)
摘要: 在写react组件的时候,会有这个警告 Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. 阅读全文
posted @ 2020-07-20 19:42 小魏code 阅读(3032) 评论(0) 推荐(0)
摘要: import React,{Component } from 'react' import './App.css'; class App extends Component{ scrollToBottom() { if (this.messagesEnd) { const scrollHeight 阅读全文
posted @ 2020-07-20 18:47 小魏code 阅读(3539) 评论(0) 推荐(0)
摘要: 定义全局变量timer。 this.state = { timer: null, }; // 组件加载完毕 启动定时器 componentDidMount(){ setTimeout(this.iTimer,0); } // 定时器 iTimer = () => { this.setState({ 阅读全文
posted @ 2020-07-20 18:25 小魏code 阅读(4285) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/SCU_Cindy/article/details/82778031 阅读全文
posted @ 2020-07-20 18:20 小魏code 阅读(170) 评论(0) 推荐(0)
摘要: //换行white-space:normal;word-break:break-all;word-wrap: break-word; 相关属性white-space: normal|pre|nowrap|pre-wrap|pre-line|inherit; white-space 属性设置如何处理元 阅读全文
posted @ 2020-07-20 17:12 小魏code 阅读(2270) 评论(0) 推荐(0)
摘要: div 加滚动条bai的方法:<div style="position:absolute; height:400px; overflow:auto"></div>div 设置滚动条显示du:overflow :yesdiv 设置滚动条自适应zhi显示:overflow :autodiv 设置上下滚动 阅读全文
posted @ 2020-07-20 17:10 小魏code 阅读(1098) 评论(0) 推荐(0)
摘要: CSS代码生成器 CSS3 Generator 终极CSS Generator CSS Grid布局生成器 静态站点生成器 Next.js Gatsby SVG 优化器 SVGOMG SVG Optimizers 动画库 Animate.css GreenSock (GSAP) Anime.js 跨 阅读全文
posted @ 2020-07-17 10:01 小魏code 阅读(122) 评论(0) 推荐(0)
摘要: https://www.jianshu.com/p/6697415d09d8 虽然用ui框架有很多是有轮播图,走马灯的,但是有时候我们的需求是这些都无法满足的, 在这里我这个菜鸟遇到了要求图文列表可以左右滑动的情况,找了很久还是swiper适合我 下面展示一下我的用法: 首先,react项目中安装s 阅读全文
posted @ 2020-07-16 15:30 小魏code 阅读(3918) 评论(0) 推荐(0)