摘要: 当页面布局和几何属性改变时就需要"重排" 避免在修改样式的过程中使用 offsetTop, scrollTop, clientTop, getComputedStyle() 这些属性, 它们都会刷新渲染队列 最小化重绘和重排, 尽量一次处理a. 使元素脱离文档流(隐藏元素),进行处理后,再显示元素b 阅读全文
posted @ 2017-05-13 21:48 全玉 阅读(224) 评论(0) 推荐(0) 编辑
摘要: autoprefixer配置 // var aPostcss = [require('autoprefixer')({ browsers: ['ios>=3','android>=2','chrome>=4','firefox>=3'] })];var aPostcss = [require('au 阅读全文
posted @ 2017-05-13 18:31 全玉 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 二叉树的结构 二叉树的创建 二叉树的插入节点 二叉树的查找节点 二叉树的比较 清空二叉树 测试代码 阅读全文
posted @ 2017-05-13 18:22 全玉 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 最大高度 function getMaxHeight(root){ if(root == null) return 0; return 1 + Math.max(getMaxHeight(root.left),getMaxHeight(root.right)); } 最小高度 function ge 阅读全文
posted @ 2017-05-13 17:36 全玉 阅读(5121) 评论(0) 推荐(0) 编辑
摘要: 1. vue中获取dom节点时机 vue组件中获取dom节点一定要在mounted周期之后的下一次事件循环,包括 component.$refs,component.$el,component.$children等一般写法在nextTick中获取,mounted不是必须:mounted(){ thi 阅读全文
posted @ 2017-05-13 17:32 全玉 阅读(679) 评论(0) 推荐(0) 编辑