摘要: window.onpageshow = function(e) { if (e.persisted) { console.log("回退方法"); that.goBack(); }}; 阅读全文
posted @ 2020-03-30 16:11 eglishzhang 阅读(227) 评论(0) 推荐(0)
摘要: // 深克隆函数 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)
摘要: /* 无返回按钮的标头 */ <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)
摘要: //获取焦点 cancelScroll(e) { clearTimeout(this.timeoutTimer) clearTimeout(this.timeoutTimer01) if (utils.isAndroid()) { this.timeoutTimer01 = setTimeout(( 阅读全文
posted @ 2020-03-19 08:33 eglishzhang 阅读(242) 评论(0) 推荐(0)
摘要: 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)
摘要: 废话不多说了 直接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)
摘要: <!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)
摘要: //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)
摘要: 挂载阶段 constructor //触发时间: React组件的构造函数在挂载之前被调用 //作用: //调用super(props),用来将父组件传来的props绑定到这个类中,使用// this.props将会得到 //做一些初始化的操作,比如: state的初始化、非箭头函数的实例属性的th 阅读全文
posted @ 2019-11-22 17:10 eglishzhang 阅读(169) 评论(0) 推荐(0)