会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yang
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
下一页
2020年7月1日
vue父子组件生命周期执行顺序
摘要: 加载渲染过程 父beforeCreate->父created->父beforeMount->子beforeCreate->子created->子beforeMount->子mounted->父mounted 子组件更新过程 父beforeUpdate->子beforeUpdate->子updated
阅读全文
posted @ 2020-07-01 10:42 Peter_Yang0942
阅读(128)
评论(0)
推荐(0)
2020年6月30日
ie9 在打开控制台可以正常加载页面,否则加载失败
摘要: 最近在调试个 bug,不开启控制台的话死活页面加载不出来。开启了控制台后页面就显示正常。经过一顿搜索,得知在 ie9 下,如果不开启控制台的话,默认是没有 console 对象的,开启后则有。 转载链接:https://www.jianshu.com/p/c2d4a033de19
阅读全文
posted @ 2020-06-30 15:07 Peter_Yang0942
阅读(236)
评论(0)
推荐(0)
2020年6月24日
图片懒加载高性能实现(IntersectionObserver方法)
摘要: 页面img标签 <img class="lazy" src="placeholder-image.jpg" data-src="image-to-lazy-load-1x.jpg" data-srcset="image-to-lazy-load-2x.jpg 2x, image-to-lazy-lo
阅读全文
posted @ 2020-06-24 11:40 Peter_Yang0942
阅读(277)
评论(0)
推荐(0)
2020年6月20日
chrome控制台一些比较实用的操作
摘要: 打开控制台按Ctrl + Shift + P命令可以发现很多操作: 1、截取dom元素:选中需要打印的节点:选中 Screenshot Capture full size screenshot 命令; 可以打印页面长图 2、重新发起xhr请求: Network面板右键需要重新发起请求的xhr,执行R
阅读全文
posted @ 2020-06-20 17:30 Peter_Yang0942
阅读(288)
评论(0)
推荐(0)
js判断变量是不是数组
摘要: var arr= [1,2,3,4]; function isArray(o) { return Object.prototype.toString.call(o)== '[object Array]'; } console.log(isArray(arr));//Object.prototype.
阅读全文
posted @ 2020-06-20 11:38 Peter_Yang0942
阅读(287)
评论(0)
推荐(0)
2020年6月15日
css3文字倒影样式
摘要: .classReflect{ -webkit-box-reflect: below 10px -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(255, 255, 255, 0.51))); } -w
阅读全文
posted @ 2020-06-15 22:40 Peter_Yang0942
阅读(1072)
评论(0)
推荐(0)
css3文字边框样式设置
摘要: Text-fill-color: 文字内部填充颜色 Text-stroke-color: 文字边界填充颜色 Text-stroke-width: 文字边界宽度 div { -webkit-text-fill-color: black; -webkit-text-stroke-color: red;
阅读全文
posted @ 2020-06-15 22:24 Peter_Yang0942
阅读(3931)
评论(0)
推荐(1)
2020年6月14日
webpack解决本地跨域问题(使用proxy)
摘要: 在Vue工程的config/index.js文件增加配置: dev: { // Paths assetsSubDirectory: 'static',assetsPublicPath: '/', proxyTable: { '/api': { target: 'http://localhost:80
阅读全文
posted @ 2020-06-14 21:47 Peter_Yang0942
阅读(270)
评论(0)
推荐(0)
直接可用的loading.js
摘要: loading.js function includeStyleElement(A, e) { if (!document.getElementById(e)) { var t = document.createElement("style"); t.id = e, (document.getEle
阅读全文
posted @ 2020-06-14 17:29 Peter_Yang0942
阅读(227)
评论(0)
推荐(0)
2020年6月4日
vue后退判断是否有历史记录,有就返回上一级,否则返回指定路由
摘要: Vue.prototype.back = function (route) { if (window.history.length > 1) { this.$router.back(); } else { this.$router.push(route); } }
阅读全文
posted @ 2020-06-04 16:55 Peter_Yang0942
阅读(3571)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
下一页
公告