摘要: grunt例子:https://github.com/Aquarius1993/gruntDemo 1、前提是已经有npm(可以通过安装nodejs实现) 2、 npm update -g npm 更新npm 3、安装 CLI npm isntall -g grunt-cli 4、 编写GRuntf 阅读全文
posted @ 2016-08-05 15:34 lhy031 阅读(258) 评论(0) 推荐(0) 编辑
摘要: webpack例子:https://github.com/Aquarius1993/webpackDemo 安装: webpack , webpack-dev-server 1.如何在使用webpack-dev-server的过程中,同时生成文件? 暂时没有解决,说是解决不了 2.怎样实现baseU 阅读全文
posted @ 2016-08-05 15:31 lhy031 阅读(1971) 评论(0) 推荐(0) 编辑
摘要: // 获取地址 function getObjectURL(file) { var url = null ; if (window.createObjectURL!=undefined) { // basic url = window.createObjectURL(file) ; } else i 阅读全文
posted @ 2016-08-05 15:30 lhy031 阅读(537) 评论(0) 推荐(0) 编辑
摘要: arryAll.forEach(function(e){ alert(e); }) IE兼容的foreach if (!Array.prototype.forEach) { Array.prototype.forEach = function(callback, thisArg) { var T, 阅读全文
posted @ 2016-08-05 15:27 lhy031 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 箭头函数: <script> var single = a => a; console.log(single('一个参数')); var log = () => { console.log('没有参数需要用小括号括起来'); }; log(); var add = (a,b) => a+b; con 阅读全文
posted @ 2016-08-05 15:25 lhy031 阅读(257) 评论(0) 推荐(0) 编辑
摘要: : 引入 <script src="//code.jquery.com/jquery-1.9.1.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <tbody id="sortable "> 阅读全文
posted @ 2016-08-05 15:23 lhy031 阅读(259) 评论(0) 推荐(0) 编辑
摘要: head标签: <head lang="en"> <meta charset="UTF-8"> <!-- 优先使用 IE 最新版本和 Chrome --> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <!-- 为移动 阅读全文
posted @ 2016-08-05 15:20 lhy031 阅读(288) 评论(1) 推荐(1) 编辑
摘要: 父子组件之间可以通过props进行通信: 组件的定义: 1.创建component类: var Profile = Vue.extend({ template: "<div>Lily</div>"; }) 2.注册一个tagnme: Vue.component("me-profile",Profil 阅读全文
posted @ 2016-08-05 15:19 lhy031 阅读(2406) 评论(0) 推荐(0) 编辑
摘要: Weinre是一款基于Web Inspector(Webkit)的远程调试工具,借助于网络,可以在PC上直接调试运行在移动设备上的远程页面,中文意思是远程Web检查器,有了Weinre,在PC上可以即时修改目标网页的HTML/CSS/Javascript,调试过程可实时显示移动设备上页面的预览效果, 阅读全文
posted @ 2016-08-05 15:01 lhy031 阅读(517) 评论(0) 推荐(0) 编辑
摘要: 首先引入css js dom中: <ul id="treeDemo" class="ztree"></ul> js: // 渲染文件树 var setting = { data: { simpleData: { enable: true, idKey: "id", //id和pid pIdKey: 阅读全文
posted @ 2016-08-05 14:40 lhy031 阅读(290) 评论(0) 推荐(0) 编辑