03 2021 档案
摘要:getNowTime(time) { const now = time const year = now.getFullYear() // 得到年份 let month = now.getMonth() + 1 // 得到月份 let date = now.getDate() // 得到日期 let
阅读全文
摘要:cookie的domain属性 545龙哥哥 2018-07-31 00:57:44 49469 收藏 44分类专栏: 龙哥哥前端笔记 文章标签: Cookie 单点登录版权欢迎大家光临我的个人博客,详戳 https://545longgege.top/ 最近在改一个bug单时,有个问题涉及到了co
阅读全文
摘要:HTML5 file对象和blob对象的互相转换 最近在做一个裁剪图片的需求,基于vue和elementui,裁剪完图片遇到一个坑,elementui的upload组件接受一个promise,要求promise resolve一个File对象才可以使用新文件上传,而canvas是转成了blob对象,
阅读全文
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>XMLHttpRequest上传文件</title> <script type="text/javascript"> /* 三个参数 file:一个是文件(类型是图片格式), w:
阅读全文
摘要:vue+vue-router转场动画的实例代码 Vue+WebPack+HBuilder 项目记录 项目搭建完毕了,但是由于是单页应用嵌入HBuilder的时候无法利用它的转场动画,于是找到了vue的转场动画写法,使体验与APP靠近,在此记录; 1.首先我们要监听路由然后判断其是前进还是后退,来实现
阅读全文
摘要:// 身份证验证 Vue.prototype.$checkIdCard = function(idCard){ let _this = this; let bbd = ''; // 出生日期 let sex = ''; // 性别 let canPass = true; idCard = idCar
阅读全文
摘要:<template> <div> <el-form :model="baseInfo" ref="baseForm" :rules="baseFormRules" label-width="110px" class="departmentDetail-ruleForm"> <el-form-item
阅读全文
摘要:getCity () { const map = new BMap.Map('map'); const nowCity = new BMap.LocalCity(); nowCity.get(bdGetPosition); const _this = this; function bdGetPosi
阅读全文
摘要:vue的axios下载excel时,获取不到Content-Disposition内容,提取文件名 function postDownload(downloadUrl, params, contentType, callback){ let headers = { 'Content-Type': c
阅读全文
摘要:downLoadReport({ id:'9003' },{responseType:'blob'}).then((res) => { let data = res.data let url = window.URL.createObjectURL(new Blob([data])) let lin
阅读全文
摘要:第一种: for......in const obj = { id:1, name:'zhangsan', age:18} for(let key in obj){ console.log(key + ' ' + obj[key]) } 输出结果: 第二种: 1)、Object.keys(obj)
阅读全文
摘要:<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>水印</title> </head> <body> <div class="warp"> <div class="title">我是标题</div> <div
阅读全文