上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页
摘要: createConnection 建立连接&关闭连接 语法 (1)createConnection方法创建连接对象(正式的说法:使用createConnection方法创建一个表示与mysql数据库服务器之间连接的connection对象) var connection = mysql.create 阅读全文
posted @ 2021-03-24 15:24 男孩亮亮 阅读(178) 评论(0) 推荐(0)
摘要: 父组件 import React from 'react'; import Tabs from './tabs'; export default class FruitsList extends React.Component { constructor(props) { super(props); 阅读全文
posted @ 2021-03-12 22:37 男孩亮亮 阅读(735) 评论(0) 推荐(0)
摘要: 使用 symbol引用 方式支持彩色图标 在react中使用 <svg class="icon" aria-hidden="true"> <use xlink:href="#icon-xxx"></use> </svg> 的时候会报错 把<svg class="icon" aria-hidden=" 阅读全文
posted @ 2021-03-07 15:47 男孩亮亮 阅读(2756) 评论(0) 推荐(0)
摘要: postcss-pxtorem使用方法:https://www.cnblogs.com/liangziaha/p/13636936.html 这里报错 postcss-pxtorem 需要 8. 我以为要使用postcss-pxtorem 8.以上的版本就去看了一下postcss-pxtorem版本 阅读全文
posted @ 2021-03-06 20:47 男孩亮亮 阅读(21457) 评论(2) 推荐(3)
摘要: mapDispatchToProps 1、当connect(mapState,null)不传递第二个参数(或为null)时,可以直接在当前组件的this.props.dispatch拿到dispatch方法 this.props.dispatch({ type:ChangeColor, payloa 阅读全文
posted @ 2021-03-05 17:15 男孩亮亮 阅读(402) 评论(0) 推荐(0)
摘要: bindActionCreators(actionsCreators,dispatch)bindActionCreators的原理 function bindActionCreators(actionCreators,dispatch) { let obj = {}; for(let i in ac 阅读全文
posted @ 2021-02-28 22:33 男孩亮亮 阅读(129) 评论(0) 推荐(0)
摘要: vue实现数据双向绑定主要是:采用数据劫持结合发布者-订阅者模式的方式,通过Object.defineProperty()来劫持各个属性的setter,getter,在数据变动时发布消息给订阅者,触发相应监听回调。当把一个普通 Javascript 对象传给 Vue 实例来作为它的 data 选项时 阅读全文
posted @ 2020-10-19 13:41 男孩亮亮 阅读(280) 评论(0) 推荐(0)
摘要: object-fit 属性指定元素的内容应该如何去适应指定容器的高度与宽度。 object-fit 一般用于 img 和 video 标签,一般可以对这些元素进行保留原始比例的剪切、缩放或者直接进行拉伸等。 object-fit: fill|contain|cover|scale-down|none 阅读全文
posted @ 2020-10-15 10:26 男孩亮亮 阅读(1592) 评论(2) 推荐(0)
摘要: 一、Pomise.all的使用 Promise.all可以将多个Promise实例包装成一个新的Promise实例。同时,成功和失败的返回值是不同的,成功的时候返回的是一个结果数组,而失败的时候则返回最先被reject失败状态的值。 具体代码如下: let p1 = new Promise((res 阅读全文
posted @ 2020-10-14 10:15 男孩亮亮 阅读(119) 评论(0) 推荐(0)
摘要: rrweb适用场景: 用户行为分析; 远程debug; 录制操作; 实时协作; 项目github:https://github.com/rrweb-io/rrweb ,觉得有用,记得帮他加个星~ 官网:https://www.rrweb.io/ <!DOCTYPE html> <html lang= 阅读全文
posted @ 2020-09-30 16:05 男孩亮亮 阅读(2151) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页