摘要: 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 小万子呀 阅读(739) 评论(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 小万子呀 阅读(16) 评论(0) 推荐(0)
摘要: 一、全局安装 npm install -g iconfont-tools 二、在下载的icon文件夹中打开终端,输入iconfont-tools,然后回车 三、根据提示可一路回车,也可自定义修改 四、最后会生成一个文件夹,里面包含一个css文件 五、将这个css文件放在项目的static中 六、在A 阅读全文
posted @ 2022-06-09 08:54 小万子呀 阅读(134) 评论(0) 推荐(0)
摘要: 封装类 //封装一个类(可直接cv) class createds { //创建公共变量 static url; //mqtt地址 static oldSubscribe; //取消订阅准备 static subscribe; //订阅地址 static client; //mqtt公共变量 //接 阅读全文
posted @ 2022-06-06 16:58 小万子呀 阅读(3513) 评论(2) 推荐(1)
摘要: const wsUrl = ref('xxxxxxxx');//链接地址 const initWebSocket = () => {//初始化 websock.value = new WebSocket(wsUrl.value); websock.value.onopen = () => { con 阅读全文
posted @ 2022-06-06 16:45 小万子呀 阅读(3103) 评论(0) 推荐(0)
摘要: https://web.dev/serial/ const arr = ref([]);//用来存储串口返回的数据 const lianjie = async () => { let port = await navigator.serial.requestPort();//用户选择串口设备 awa 阅读全文
posted @ 2022-06-02 14:33 小万子呀 阅读(3580) 评论(0) 推荐(0)
摘要: const speak = (sentence) => { const utterance = new SpeechSynthesisUtterance(sentence); window.speechSynthesis.speak(utterance); }; speak('你好') 阅读全文
posted @ 2022-05-30 09:28 小万子呀 阅读(102) 评论(0) 推荐(0)
摘要: let pages = getCurrentPages(); //获取所有页面栈实例列表 console.log(pages, "pages"); let nowPage = pages[pages.length - 1]; //当前页页面实例 let prevPage = pages[pages. 阅读全文
posted @ 2022-05-25 00:30 小万子呀 阅读(157) 评论(0) 推荐(0)
摘要: //准备 npm install js-file-download --save //使用 export function download(val) { return flies({ url: "/assets/exportAssets", method: "get", params: val, 阅读全文
posted @ 2022-05-23 10:25 小万子呀 阅读(201) 评论(0) 推荐(0)
摘要: 1、去下载 2、下载解压 3、可以在state文件夹中创建一个font文件夹,用于存放iconfont.css文件 4、去转化iconfont.ttf https://www.giftofspeed.com/base64-encoder/ 5、改造iconfont.css文件代码 6、app.vue 阅读全文
posted @ 2022-05-13 16:27 小万子呀 阅读(353) 评论(0) 推荐(0)