摘要: fetch(url).then(res => res.blob()).then(blob => { const a = document.createElement('a') document.body.appendChild(a) a.style.display = 'none' const ur 阅读全文
posted @ 2022-12-10 10:38 小万子呀 阅读(19) 评论(0) 推荐(0) 编辑
摘要: module.exports = function(data, filename, mime, bom) { var blobData = (typeof bom !== 'undefined') ? [bom, data] : [data] var blob = new Blob(blobData 阅读全文
posted @ 2022-12-10 09:00 小万子呀 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 主要是通过定时器去设置margin-top的数据,然后动态push到数组最后面去并删除第一项 <template> <div> <div class="mian" @mouseenter="mouseenter" @mouseleave="mouseleave"> <div class="title 阅读全文
posted @ 2022-09-25 22:18 小万子呀 阅读(45) 评论(0) 推荐(0) 编辑
摘要: ### 安装 ```javascript npm install postcss-pxtorem -D ``` ### 在utils文件夹中建立一个 rem.js文件 ```javascript // 基准大小 const baseSize = 32 // 设置 rem 函数 function se 阅读全文
posted @ 2022-09-24 14:33 小万子呀 阅读(33) 评论(0) 推荐(0) 编辑
摘要: //使用百度地图 <script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&type=webgl&ak=自己的key"></script> function gets () { var geolocation = 阅读全文
posted @ 2022-08-04 17:06 小万子呀 阅读(25) 评论(0) 推荐(0) 编辑
摘要: TS && JS版本 npm install --save @types/crypto-js npm install crypto-js import CryptoJS from 'crypto-js'; /** * 3DES 加密 * iv: --后端提供偏移量 * KEY: --密码 后端提供 阅读全文
posted @ 2022-07-26 14:52 小万子呀 阅读(703) 评论(0) 推荐(0) 编辑
摘要: showTime = () => { let end = new Date("2022-12-14 00:00:00").getTime(); let now = new Date().getTime(); let data = end - now; let day = (parseInt(data 阅读全文
posted @ 2022-06-23 14:30 小万子呀 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 一、全局安装 npm install -g iconfont-tools 二、在下载的icon文件夹中打开终端,输入iconfont-tools,然后回车 三、根据提示可一路回车,也可自定义修改 四、最后会生成一个文件夹,里面包含一个css文件 五、将这个css文件放在项目的static中 六、在A 阅读全文
posted @ 2022-06-09 08:54 小万子呀 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 封装类 //封装一个类(可直接cv) class createds { //创建公共变量 static url; //mqtt地址 static oldSubscribe; //取消订阅准备 static subscribe; //订阅地址 static client; //mqtt公共变量 //接 阅读全文
posted @ 2022-06-06 16:58 小万子呀 阅读(3324) 评论(2) 推荐(0) 编辑
摘要: const wsUrl = ref('xxxxxxxx');//链接地址 const initWebSocket = () => {//初始化 websock.value = new WebSocket(wsUrl.value); websock.value.onopen = () => { con 阅读全文
posted @ 2022-06-06 16:45 小万子呀 阅读(2975) 评论(0) 推荐(0) 编辑