会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
eglishzhang
博客园
首页
新随笔
联系
订阅
管理
2020年3月30日
监听浏览器回退时间
摘要: window.onpageshow = function(e) { if (e.persisted) { console.log("回退方法"); that.goBack(); }};
阅读全文
posted @ 2020-03-30 16:11 eglishzhang
阅读(227)
评论(0)
推荐(0)
2020年3月20日
深浅克隆
摘要: // 深克隆函数 var cloneObj = function (obj) { var newObj = {}; if (obj instanceof Array) { newObj = []; } for (var key in obj) { var val = obj[key]; //newO
阅读全文
posted @ 2020-03-20 16:15 eglishzhang
阅读(144)
评论(0)
推荐(0)
2020年3月19日
vue 刘海屏兼容组件
摘要: /* 无返回按钮的标头 */ <template> <div v-if="GLOBAL.evnType GLOBAL.ENV_TYPES.APP_IOS || GLOBAL.evnType GLOBAL.ENV_TYPES.APP_ANDROID" class='stateBox' :class="
阅读全文
posted @ 2020-03-19 13:24 eglishzhang
阅读(1770)
评论(0)
推荐(0)
H5 Input解决橡皮筋效果
摘要: //获取焦点 cancelScroll(e) { clearTimeout(this.timeoutTimer) clearTimeout(this.timeoutTimer01) if (utils.isAndroid()) { this.timeoutTimer01 = setTimeout((
阅读全文
posted @ 2020-03-19 08:33 eglishzhang
阅读(242)
评论(0)
推荐(0)
2020年1月15日
vue echasrts的封装 (借鉴他人稍微改动)
摘要: vue-echasrts的封装 废话不多说了 1. npm install echarts --save 2.组件代码 <template> <div class="echarts"> <div id="echart"></div> </div> </template> <script> impor
阅读全文
posted @ 2020-01-15 01:09 eglishzhang
阅读(296)
评论(0)
推荐(0)
2019年12月11日
webpack 配置 Vue环境
摘要: 废话不多说了 直接package.json 和 webpack.config.js webpack.config.js const path=require("path") const HtmlWebpackPlugin = require('html-webpack-plugin'); const
阅读全文
posted @ 2019-12-11 15:00 eglishzhang
阅读(211)
评论(0)
推荐(0)
2019年11月27日
全屏代码
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
posted @ 2019-11-27 22:12 eglishzhang
阅读(1212)
评论(0)
推荐(0)
2019年11月26日
react 移动端 1像素线的使用
摘要: //1像素线文件 @mixin border($color,$width) { & { position: relative; &:before { content: ""; position: absolute; top: 0; left: 0; border-style: solid; bord
阅读全文
posted @ 2019-11-26 17:33 eglishzhang
阅读(337)
评论(0)
推荐(0)
2019年11月22日
react生命周期的总结
摘要: 挂载阶段 constructor //触发时间: React组件的构造函数在挂载之前被调用 //作用: //调用super(props),用来将父组件传来的props绑定到这个类中,使用// this.props将会得到 //做一些初始化的操作,比如: state的初始化、非箭头函数的实例属性的th
阅读全文
posted @ 2019-11-22 17:10 eglishzhang
阅读(169)
评论(0)
推荐(0)
公告