摘要: 1. Better CommentsBetter Comments 帮助您在代码中创建更人性化的注释 2. A-super-comprehensive 代码补全合集(vue-webpack-bootstrap-node-mui-html-js-jquery-php-css-react-native) 阅读全文
posted @ 2021-07-12 17:38 言穹 阅读(739) 评论(0) 推荐(0) 编辑
摘要: 1.!可将变量转换成boolean类型,null、undefined和空字符串取反都为true,其余都为false。 !null true !undefined true !'null' false !'' true 2.!!常常用来做类型判断,在第一步!(变量)之后再做逻辑取反运算 阅读全文
posted @ 2021-03-04 10:47 言穹 阅读(331) 评论(0) 推荐(0) 编辑
摘要: beforeRouteLeave (to, from, next) { if (to.path '/index/apps') { // from.meta.keepAlive = false if (this.$vnode && this.$vnode.data.keepAlive) { if (t 阅读全文
posted @ 2020-03-31 15:30 言穹 阅读(1781) 评论(0) 推荐(0) 编辑
摘要: fastClick.prototype.focus = function (targetElement) { targetElement.focus() } 阅读全文
posted @ 2020-01-15 18:05 言穹 阅读(386) 评论(0) 推荐(0) 编辑
摘要: .g-panel { height: calc(100% - 112px); overflow: auto; &::-webkit-scrollbar { display: none; // 重点 } } element::-webkit-scrollbar { display: none; // 阅读全文
posted @ 2020-01-15 14:23 言穹 阅读(1200) 评论(0) 推荐(0) 编辑
摘要: 大多数的web服务器只能识别form的post的请求,即请求头Content-Type为’application/x-www-form-urlencoded‘ axios.defaults.headers.post['Content-Type'] = 'application/x-www-form- 阅读全文
posted @ 2019-12-17 16:55 言穹 阅读(1022) 评论(0) 推荐(0) 编辑
摘要: 一般来说,不要在then方法里面定义 Reject 状态的回调函数(即then的第二个参数),总是使用catch方法。 // bad promise .then(function(data) { // success }, function(err) { console.log('接口报错'); / 阅读全文
posted @ 2019-09-10 09:53 言穹 阅读(4572) 评论(0) 推荐(0) 编辑
摘要: imput 属性有以下几种: 1.type:input类型这就不多说了2.accept:表示可以选择的文件类型,多个类型用英文逗号分开,常用的类型见下表。 1 3.multiple:是否可以选择多个文件,多个文件时其value值为第一个文件的虚拟路径。 1 下面就是各种文件类型 阅读全文
posted @ 2019-08-29 10:55 言穹 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 遇到一个屏蔽点击事件,以前一般都是通过js控制,阻止事件,今天看到css加一个样式就能屏蔽,来记录一下 随便其他方法也记下吧 1. jquery禁用a标签 方法1: 方法2 方法3 直接控制标签禁用 disabled 阅读全文
posted @ 2019-08-21 10:58 言穹 阅读(18603) 评论(0) 推荐(2) 编辑
摘要: 直接通过watch监听对象,对象的属性值变化并不会触发这个监听,通过查文档发现还有一个属性deep:true,可以深入监听, 但是监听到的新旧值是一样的,所以通过computed和watch使用 阅读全文
posted @ 2019-08-20 14:16 言穹 阅读(14438) 评论(0) 推荐(1) 编辑