07 2020 档案

摘要:alert:function(content,title="温馨提示",bottontext){ this.$alert(content,title,{ customClass:"conAlert", confirmButtomText:bottontext, confirmButtonClass: 阅读全文
posted @ 2020-07-30 14:10 一只小菜鸟呀! 阅读(172) 评论(0) 推荐(0)
摘要://加载动画开始 loadingStart(){ this.loadingObj = this..$loading({ lock:true, text:"数据请求中....", spinner:“el-icon-loading”, nackground:'rbga(0,0,0,0.3' }) } / 阅读全文
posted @ 2020-07-30 14:06 一只小菜鸟呀! 阅读(199) 评论(0) 推荐(0)
摘要:getDate(startDate){ let newDate=new Date(startDate).getTime() - 1000*60*60*24 let date = new Date(newDate); let y= date.getFullYear() let m=(data.getM 阅读全文
posted @ 2020-07-30 13:53 一只小菜鸟呀! 阅读(2386) 评论(0) 推荐(0)
摘要:在做vue项目是遇到一个需求 在业务申请页面,点击右侧任意菜单,页面弹框提示“若该笔业务超过24小时未提交,系统将自动作废!”,点击弹框的“确定”按钮,则离开本页面,否则,留在本页面 代码与methods平级: beforeRouteLeave(to,from,next){ if(to.path = 阅读全文
posted @ 2020-07-28 16:25 一只小菜鸟呀! 阅读(521) 评论(0) 推荐(0)
摘要:数组的响应式操作 //this.letters.push('123');//在末尾添加一个元素 //this.letters.pop();//从末尾删除一个元素//this.letters.unshift('111');//在开端添加一个元素//this.letters.shift();//从开端删 阅读全文
posted @ 2020-07-28 15:21 一只小菜鸟呀! 阅读(312) 评论(0) 推荐(0)
摘要:leftAdd0(){ var value=this.form.inputNum; var inputNum=this.form.inputNum.replace(/\s+/g,'') var reg=/^[\d\s]+$/; if(!reg.test(value) && inputNum){ th 阅读全文
posted @ 2020-07-28 15:11 一只小菜鸟呀! 阅读(200) 评论(0) 推荐(0)
摘要:this.form.inputNum = (rule,value,callback) => {// 保单号码校验 左位补零&&去除空格 var reg = /^[\d\s]+$/; if(!reg.test(value) && this.form.inputNum){ this.$message({ 阅读全文
posted @ 2020-07-23 09:50 一只小菜鸟呀! 阅读(205) 评论(0) 推荐(0)
摘要:/** * 自定义函数名:PrefixZero * @param num: 被操作数 * @param n: 固定的总位数 */ function PrefixZero(num, n) { return (Array(n).join(0) + num).slice(-n); } 使用原理下:: Ar 阅读全文
posted @ 2020-07-22 17:00 一只小菜鸟呀! 阅读(5914) 评论(0) 推荐(0)
摘要:计算属性computed : 1. 支持缓存,只有依赖数据发生改变,才会重新进行计算 2. 不支持异步,当computed内有异步操作时无效,无法监听数据的变化 3.computed 属性值会默认走缓存,计算属性是基于它们的响应式依赖进行缓存的,也就是基于data中声明过或者父组件传递的props中 阅读全文
posted @ 2020-07-04 16:44 一只小菜鸟呀! 阅读(739) 评论(0) 推荐(0)