摘要: 我在使用 vue-lazyload的时候,安装目录的位置,配置loading的图片位置 在main.js 里配置 Vue.use(VueLazyload, { loading:“” } 我试过的方法: ./assets/loading.gif /assets/loading.gif assets/l 阅读全文
posted @ 2018-08-10 15:46 adongP 阅读(6894) 评论(0) 推荐(0) 编辑
摘要: 在使用nvm的时候 请先把原先的全局nodejs给卸载掉: 下载 nvm 包 地址:https://github.com/coreybutler/nvm-windows/releases,我们选择第一个:nvm-noinstall.zip 下载完成后解压到一个地方,比如: C:\dev\nvm 里面 阅读全文
posted @ 2018-08-01 14:04 adongP 阅读(7528) 评论(0) 推荐(0) 编辑
摘要: function ajaxFn(type,url,bool) { var xhr = new XMLHttpRequest(); xhr.open(type, url, bool); xhr.send(null); xhr.onreadystatechange = function() { if(xhr.readyState == 4) { console.log(... 阅读全文
posted @ 2018-07-11 09:56 adongP 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 例如引入第三方swiper: 首先:npm install swiper --save npm install swiper --save-dev npm install @types/swiper --save npm install @types/swiper --save-dev 下载好之后: 阅读全文
posted @ 2018-07-09 09:03 adongP 阅读(674) 评论(0) 推荐(0) 编辑
摘要: 新建了一个组件,payment,在主页面引入显示正常 在非主页引入(payment-approval):(未引入): 引入后: 引入的写法是一模一样的,为什么报错呢? 其原因是:组件在引用的时候,要在被引用的页面(payment-approval)里引入这个模块(PaymentComponent); 阅读全文
posted @ 2018-06-28 11:25 adongP 阅读(896) 评论(0) 推荐(0) 编辑
摘要: 一、此方法性能不太好 耗时 400ms 二、此方法简便,易懂,耗时少 大概50ms 阅读全文
posted @ 2018-06-20 11:16 adongP 阅读(1067) 评论(2) 推荐(0) 编辑
摘要: [图片] 阅读全文
posted @ 2018-06-19 10:19 adongP 阅读(130) 评论(0) 推荐(0) 编辑
摘要: function testc(str) { //默认为0 var count = 0; for(var i = 0; i < str.length; i++) { //循环获取每一个字符 var c = str.charAt(i); //console.log(c); //正则,匹配中文, coun... 阅读全文
posted @ 2018-06-19 09:43 adongP 阅读(429) 评论(0) 推荐(0) 编辑
摘要: //全局变量 // $GLOBALS // $_REQUEST // $_POST // $_GET $a = 10; function fn(){ $b = 100; $GLOBALS["c"] = $GLOBALS["a"] + $b; } fn(); echo $c; ?> 表单提交: $_R 阅读全文
posted @ 2018-06-15 10:10 adongP 阅读(357) 评论(0) 推荐(0) 编辑
摘要: es6: 字符串 去重: 阅读全文
posted @ 2018-06-14 13:53 adongP 阅读(181) 评论(0) 推荐(0) 编辑