摘要: 1.流程创建入口; a.在创建入口之前,定义当前被选中节点信息currentEditor和当前流程图信息currentGraph(后面保存和编辑会用到); b.定义容器container, 上侧工具栏容器outline,上侧工具栏的逻辑效果 toolbar,左边工具栏拖动 sidebar, 当前节点 阅读全文
posted @ 2018-03-06 14:42 闹闹猪 阅读(144) 评论(1) 推荐(0) 编辑
摘要: 1.怎么判断一个变量是String类型? var str="1"; typeof(str) "string" typeof str "string" str.constructor String 2.ajax同步和异步的区别 async:false 默认为异步,就是说当ajax发送请求后,在等待服务 阅读全文
posted @ 2018-03-02 17:55 闹闹猪 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.props是子组件的参数,是父组件传递值的自定义属性, 2.表达式传值 3.列表父子组件传值 props属性,单向的,只有父组件的数据发生改变时,子组件的值才会发生改变,不会逆向。 阅读全文
posted @ 2018-03-01 18:12 闹闹猪 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1.methods和computed的区别,什么情况下适用? html js methods:方法,调用时才会触发, computed:依赖某个值,才会去更新页面的数据。就像上面所出示的一样,依赖于num的值,才会去触发computed。也就是说只有当他依赖的值发生改变时,才回去重新求值, 否则会一 阅读全文
posted @ 2018-03-01 15:07 闹闹猪 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Webpack的学习之旅 entry:入口文件 output:{ path:打包后的入口文件的目录 filename: 打包后的入口文件的名字 publicPath:打包后的给文件添加正式环境的路径} 8. 安装html-webpack-plugin插件,处理html文件 命令:cnpm i htm 阅读全文
posted @ 2018-03-01 11:00 闹闹猪 阅读(103) 评论(0) 推荐(0) 编辑
摘要: ajax()方法是jQuery底层的ajax实现,通过HTTP请求加载远程数据。 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $.ajax({ type: "GET", url: "handleAjaxRequest.action", data: { 阅读全文
posted @ 2016-07-19 13:01 闹闹猪 阅读(500) 评论(0) 推荐(0) 编辑
摘要: 选择器例子例子描述CSS .class .intro 选择 class="intro" 的所有元素。 1 #id #firstname 选择 id="firstname" 的所有元素。 1 * * 选择所有元素。 2 element p 选择所有 <p> 元素。 1 element,element 阅读全文
posted @ 2016-07-14 13:23 闹闹猪 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 转载http://www.cnblogs.com/lhb25/p/inside-block-formatting-ontext.html 在解释 BFC 是什么之前,需要先介绍 Box、Formatting Context的概念。 Box: CSS布局的基本单位 Box 是 CSS 布局的对象和基本 阅读全文
posted @ 2016-06-16 14:25 闹闹猪 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cocoachina.com/webapp/20150721/12692.html 现在最热门的前端框架有AngularJS、React、Bootstrap等。自从接触了ReactJS,ReactJs的虚拟DOM(Virtual DOM)和组件化的开发深深的吸引了我,下面 阅读全文
posted @ 2016-06-16 09:13 闹闹猪 阅读(9447) 评论(0) 推荐(2) 编辑
摘要: <script type="text/babel"> var Myelement=React.createClass({ handleClick:function(){ this.refs.myInput.focus(); this.refs.[refname]获取真实的节点 只有真实的DOM发生c 阅读全文
posted @ 2016-06-15 17:38 闹闹猪 阅读(245) 评论(0) 推荐(0) 编辑