![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
月影星云
这个作者很懒,什么都没留下…
展开
-
js、vue图片链接转成base64
1、创建imgUrlToBase64.js文件imgUrlToBase64.js2、封装代码如下export let imgUrlToBase64 = function(imgUrl){ let base64Url = ""; let image = new Image(); image.setAttribute("crossOrigin", "anonymous");//解决跨域问题 image.src = imgUrl; image.onload = function原创 2021-10-19 10:30:04 · 1246 阅读 · 0 评论 -
js如何获取今年每个月的天数
monthArrData(){ let year = new Date().getFullYear; let isRunNian = true;//true是闰年,false是平年 let monthArr = []; if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0){ isRunNian = true; }else{ isRunNian = false;原创 2021-09-29 09:46:06 · 164 阅读 · 0 评论