12 2019 档案

摘要:一,在 created中 注册 页面刷新和关闭事件 created() { window.addEventListener('beforeunload', e => this.test(e)) } 二,事件,将你的逻辑方法加进去 methods: { test(e) { console.log('刷 阅读全文
posted @ 2019-12-27 21:41 武卡卡 阅读(17928) 评论(0) 推荐(2) 编辑
摘要:定义 : global.变量名=‘xxxx’; 取出 : global.变量名 阅读全文
posted @ 2019-12-25 21:46 武卡卡 阅读(4769) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-12-24 12:27 武卡卡 阅读(4015) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2019-12-20 15:08 武卡卡 阅读(369) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2019-12-20 14:41 武卡卡 阅读(2125) 评论(0) 推荐(0) 编辑
摘要:router.beforeEach((to, from, next) => { if(to.path!='/login' && localStorage.token==undefined){ next('/login') return } next() }) 阅读全文
posted @ 2019-12-19 21:18 武卡卡 阅读(115) 评论(0) 推荐(0) 编辑
摘要:/^[\u4E00-\u9FA5A-Za-z0-9]+$/ 阅读全文
posted @ 2019-12-18 13:41 武卡卡 阅读(7126) 评论(2) 推荐(5) 编辑
摘要:一、校验数字的表达式 数字:^[0-9]*$ n位的数字:^\d{n}$ 至少n位的数字:^\d{n,}$ m-n位的数字:^\d{m,n}$ 零和非零开头的数字:^(0|[1-9][0-9]*)$ 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(\.[0-9]{1,2})?$ 带1 阅读全文
posted @ 2019-12-18 08:52 武卡卡 阅读(211) 评论(0) 推荐(0) 编辑
摘要:var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789' console.log(chars.charAt(Math.floor(Math.random() * chars.length))) 阅读全文
posted @ 2019-12-16 21:23 武卡卡 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-12-16 15:10 武卡卡 阅读(4061) 评论(0) 推荐(0) 编辑
摘要:第一种,只引入单个图片,这种引入方法在异步中引入则会报错。 比如需要遍历出很多图片展示时 <image :src = require('图片的路径') /> 第二种,可引入多个图片,也可引入单个图片。 vuelic3版本没有static文件夹。可将静态图片存放到public目录下,直接引入即可 <i 阅读全文
posted @ 2019-12-16 14:50 武卡卡 阅读(22811) 评论(1) 推荐(8) 编辑
摘要:var arr =['h','e','l','l','o'] var s = arr.join(""); console.log(s); 阅读全文
posted @ 2019-12-11 10:41 武卡卡 阅读(584) 评论(0) 推荐(0) 编辑
摘要:$("#test").css("pointer-events","none") 阅读全文
posted @ 2019-12-11 10:20 武卡卡 阅读(3880) 评论(4) 推荐(0) 编辑
摘要:/* 为对应的路由跳转时设置动画效果 */ <transition name="fade"> <router-view /> </transition> .fade-enter-active, .fade-leave-avtive { transition: opacity 1s } .fade-e 阅读全文
posted @ 2019-12-10 09:33 武卡卡 阅读(3042) 评论(0) 推荐(0) 编辑
摘要:1, 原因是因为:findOneAndUpdate()内部会使用findAndModify驱动,驱动即将被废弃,所以弹出警告!附上官方解释:Mongoose v5.5.8: Deprecation Warnings 2, 解决方法 在使用mongose时全局设置 mongoose.set('useF 阅读全文
posted @ 2019-12-08 00:14 武卡卡 阅读(2270) 评论(0) 推荐(2) 编辑
摘要:<img class="headImg" :src="require('../../assets/uploads/'+headImg)" alt="图片资源"> 阅读全文
posted @ 2019-12-03 20:47 武卡卡 阅读(1175) 评论(0) 推荐(0) 编辑
摘要:<div class="right userPicture" :style="[{'background':`url(${userImg}) no-repeat center`},{'background-size': 'cover'}]"></div> 阅读全文
posted @ 2019-12-03 20:30 武卡卡 阅读(6226) 评论(0) 推荐(2) 编辑

喜欢请打赏

扫描二维码打赏

支付宝打赏

点击右上角即可分享
微信分享提示