上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页
摘要: 一、require.ensure() 方法来实现代码打包分离 require.ensure() 是 webpack 特有的,已经被 import() 取代。 按照上面指定的顺序,webpack 支持以下参数: dependencies:字符串构成的数组,声明 callback 回调函数中所需的所有模 阅读全文
posted @ 2018-08-27 17:56 SKILL·NULL 阅读(5934) 评论(2) 推荐(0) 编辑
摘要: 一、在app.js利用官方方法获取设备信息,将获取到的screenHeight、windowHeight度量单位统一由rpx换算为px 注:官方文档给出 【rpx换算px (屏幕宽度/750) 】【 px换算rpx (750/屏幕宽度)】 App({ onLaunch: function() { w 阅读全文
posted @ 2018-07-30 19:36 SKILL·NULL 阅读(8478) 评论(0) 推荐(0) 编辑
摘要: <template> <audio src="./static/music.mp3" id="bgMusic" preload="auto" loop></audio> <div class="bgMusicBtn" @click="bgMusicPlayOrPause('bgMusic')"> < 阅读全文
posted @ 2018-07-24 14:13 SKILL·NULL 阅读(3543) 评论(0) 推荐(0) 编辑
摘要: GitHub: https://github.com/skillnull/Get-Device-Info 在线实例:http://skillnull.com/others/GetDeviceInfo/index.html 阅读全文
posted @ 2018-04-10 17:33 SKILL·NULL 阅读(6022) 评论(0) 推荐(0) 编辑
摘要: /** * @function Determine if the image has been loaded. * @param img,callback */ function imgIsLoaded(img, callback) { var timer = setInterval(functio 阅读全文
posted @ 2018-04-10 17:02 SKILL·NULL 阅读(252) 评论(0) 推荐(0) 编辑
摘要: /** * 如果target(也就是FirstOBJ[key])存在, * 且是对象的话再去调用deepObjectMerge, * 否则就是FirstOBJ[key]里面没这个对象,需要与SecondOBJ[key]合并 */function deepObjectMerge(FirstOBJ, S 阅读全文
posted @ 2018-04-10 16:51 SKILL·NULL 阅读(5483) 评论(0) 推荐(0) 编辑
摘要: /** * @function Monitor whether the document tree is loaded. * @param fn */function domReady(fn) { if (document.addEventListener) { // 标准浏览器 document. 阅读全文
posted @ 2018-04-10 16:48 SKILL·NULL 阅读(478) 评论(0) 推荐(0) 编辑
摘要: 如果页面a.html引用了b.js,b.js里的方法需要在页面资源加载完成后执行,即在window.onload里执行;这时如果a.html里使用了window.onload方法,b.js就不能重复调用这个方法了,因为window.onload不能同时使用多个,否则后者会覆盖前者。可以用如下方法解决 阅读全文
posted @ 2018-04-10 16:31 SKILL·NULL 阅读(1855) 评论(0) 推荐(0) 编辑
摘要: function setCookie(cookieName, cookieValue, expires) { // 设置Cookie function getCookieName(cookieName) { //获取并返回与 cookieName 同名的 cookie 名称,允许大小写不同,如果不存 阅读全文
posted @ 2018-03-30 16:42 SKILL·NULL 阅读(183) 评论(0) 推荐(0) 编辑
摘要: $ git clone http://xxx.xxx.cn/liyafei/developer.gitCloning into 'developer'...remote: Counting objects: 10681, done.remote: Compressing objects: 100% 阅读全文
posted @ 2018-03-30 16:37 SKILL·NULL 阅读(5747) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页