摘要: $(function(){ if (window.history && window.history.pushState) { window.addEventListener("popstate", function (e) { //回调函数中实现需要的功能 // alert("我监听到了浏览器的返 阅读全文
posted @ 2019-11-26 14:24 零碎沉默 阅读(1847) 评论(0) 推荐(0) 编辑
摘要: 1、自定义滚动条 .test-1::-webkit-scrollbar {/*滚动条整体样式*/ width: 10px; /*高宽分别对应横竖滚动条的尺寸*/ height: 1px; } .test-1::-webkit-scrollbar-thumb {/*滚动条里面小方块*/ border- 阅读全文
posted @ 2018-08-02 14:33 零碎沉默 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 2、调用 在main.js中引入封装文件并当作vue插件使用 import Utile from './lib/utils' Vue.use(Utile) 3、在模块中使用get请求 this.$instance.get(`Employee/Detail/${this.$route.query.us 阅读全文
posted @ 2018-07-20 10:44 零碎沉默 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 1、当angular渲染完成后操作DOM树方法 //当数据渲染完毕 ngApp.directive('repeatFinish', function () { return { link: function (scope, element, attr) { if (scope.$last == tr 阅读全文
posted @ 2018-07-12 12:40 零碎沉默 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1、获取url中的参数 function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); //构造一个含有目标参数的正则表达式对象 var r = window.location.sea 阅读全文
posted @ 2018-06-27 18:12 零碎沉默 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 1、<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />强制把不标准的转换成 标准的<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10" />强制兼容ie10 阅读全文
posted @ 2018-05-10 23:59 零碎沉默 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 阻止单击事件冒泡 <a v-on:click.stop="doThis"></a>提交事件不再重载页面<form v-on:submit.prevent="onSubmit"></form>修饰符可以串联 <a v-on:click.stop.prevent="doThat"></a>只有修饰符 < 阅读全文
posted @ 2018-04-27 15:49 零碎沉默 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1、属性名已$开头的都是内部提供的属性 2、为什么使用事件修饰符的原因:methods 只有纯粹的数据逻辑,而不是去处理 DOM 事件细节 3、v-if 如果值为false,元素在页面中不存在;值为true,展示在页面中 v-show 如果值为false,元素隐藏display:none;如果值为t 阅读全文
posted @ 2018-04-27 15:42 零碎沉默 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 1、在css中给属性前面加“+”是为了识别IE6,IE7,加“_”只识别IE6 2、在表单验证中,当input输入密码后,第二次打开会出现屎黄色背景,并且记住密码,如果要去掉屎黄色可以设置(<input actocomplate = "off),但是这样密码也会比去掉,还可以重新设置样式背景(-we 阅读全文
posted @ 2018-04-16 14:07 零碎沉默 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1、文件build里的check-versions.js:检查node和npm版本, 此文件里的 (1)require('chalk')引入一个模块,定义输入终端样式 (2) require('semver')处理版本号 (3)require('shelljs')执行终端命令 (4)versionR 阅读全文
posted @ 2018-04-09 17:04 零碎沉默 阅读(134) 评论(0) 推荐(0) 编辑