由于不清楚App组件的this.props.children属性就是子组件,所以在url设置路径访问时希望的组件一直不能显示。 参考:http://www.ruanyifeng.com/blog/2016/05/react_router.html 同时由于react-router组件版本升级(v4 ...
分类:
其他好文 时间:
2017-07-11 19:35:43
阅读次数:
154
一直分不清React.Children与this.props.children是什么关系。其实很简单,this.props.children是子组件的集合,相当于把子组件当做组件的属性传入。 this.props.children有三种情况: 1.没有子组件时,数据类型为undefined 2.只有 ...
分类:
其他好文 时间:
2017-07-11 17:42:41
阅读次数:
124
if (parentOrg) { if (parentOrg.children) { parentOrg.children.push(org); } else { parentOrg.children = []; parentOrg.children.push(org); } } else { r. ...
分类:
编程语言 时间:
2017-07-10 19:07:36
阅读次数:
180
选择器使用 基本选择器 id选择器:$('#id'); class选择器:$('.class'); 标签选择器:$('tag'); 通配符选择器:$('*'); 避免使用 this选择器:$(this); 复合选择器:$("#test, div, p.text"); 可以改写为:$('#test') ...
分类:
Web程序 时间:
2017-07-10 10:23:27
阅读次数:
166
1. 下图展示了一个家族树。通过 jQuery 遍历,您能够从被选(当前的)元素开始,轻松地在家族树中向上移动(祖先),向下移动(子孙),水平移动(同胞)。这种移动被称为对 DOM 进行遍历。 图示解释: <div> 元素是 <ul> 的父元素,同时是其中所有内容的祖先。 <ul> 元素是 <li> ...
分类:
Web程序 时间:
2017-07-09 23:10:46
阅读次数:
196
其中两个知识点需要注意: 1.分页的前后交互配置。 2.全选隐藏功能,该条信息的前后交互(全选与该条信息的绑定)。 a)分页的交互: $(function(){ var pageNum=1;//总页数 var pageIndex=1;//页索引,当前页 var num=10; getData(1,n ...
分类:
其他好文 时间:
2017-07-08 18:54:26
阅读次数:
186
n children are standing in a circle and playing a game. Children's numbers in clockwise order form a permutation a1,?a2,?...,?an of length n. It is an ...
分类:
其他好文 时间:
2017-07-08 00:27:44
阅读次数:
205
使用H5的全局属性contenteditable可以让DOM元素及其子元素变的可编辑 样式代码 html, body { overflow: hidden; width: 100%; height: 100%; } * { margin: 0; padding: 0; } #editor { wid ...
分类:
其他好文 时间:
2017-07-06 22:06:04
阅读次数:
304
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>水平拖动滚动</title> <style> #box{ width: 400px; height: 10px; background-color: #ccc; m ...
分类:
其他好文 时间:
2017-07-06 20:45:10
阅读次数:
137
最近做了一个功能,点击按钮新建控件,再次点击需要删除上一次的结果,重新新建控件,如图: 设置参数,第一次点击分类按钮: 更改参数,第二次点击分类按钮: 试了很多方法都不行,update(),repaint()均没有效果,简单的移除layout也不管用,后来发现问题在于前一次创建的控件没有delete ...
分类:
其他好文 时间:
2017-07-06 15:15:24
阅读次数:
515