WishMeLz

生活其实很有趣

一个项目不同版本的依赖包

"codemirror": "^6.0.1", "codemirror5582": "npm:codemirror@5.58.2",npm install 别名@npm:包名@版本号 npm install codemirror5582@npm:codemirror@5.58.2

划词弹框

鼠标选中文本弹出悬浮框,计算选中文字的位置。@mouseup.stop="handleMouseUp" <div class="cont" id="textareaCont"> <textarea @select.stop="onSelect" @keydown="onKeyDown" ref="origintext" v-model="origin"></textare...

Windows 激活

https://github.com/TGSAN/CMWTAT_Digital_Edition https://cmwtat.cloudmoe.com/cn.htmlhttps://github.com/massgravel/Microsoft-Activation-Scripts https://massgrave.dev/镜像下载1.HelloWindows: https://www.hellowindows.cn/2.MSDN 山己几子木 https://msdn.sjjzm.com/3.MSDN 系统库 https://www.xito...

qrcode

import QRCode from 'qrcode' let canvas:any = document.getElementById('canvas') QRCode.toCanvas( canvas, 'text', { width: 150 }, function (error) { ...

文件处理

1、base64转file对象let imageBase64 let blob = dataURLtoBlob(imageBase64) let file = blobToFile(blob, Date.now() + '.png') dataURLtoBlob(dataurl) { var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), ...

小程序接口被高频访问

安全检测过程中,平台会模拟真实业务场景,向提审小程序的后台发送服务请求,服务器会收到来自平台(显示为:Tencent Security Team,请求IP为106.55.202.118;113.96.223.69;125.39.132.125)的请求。官方公告

解决elementui table固定列的时候,滚动条被遮挡无法拖动的问题

1、修改el-table__body-wrapper样式的层级 /deep/ .el-table__body-wrapper{ z-index: 2 }解决滚动条被遮住的问题,同时含有合计也适用,缺点:就是表头和合计那部分有阴影,中间的部分没有阴影,不过不影响效果,问题不大。2、修改el-table__fixed样式.el-table { .el-table__fixed { height:auto !important; bottom:17px !important; } }就是设置...

浏览器内核判断

const userAgent = navigator.userAgent; const isWechat = /MicroMessenger/.test(userAgent); const isAlipay = /AlipayClient/.test(userAgent); const isChrome = /Chrome/.test(userAgent) && /Google Inc/.test(navigator.vendor); const isFirefox = /Firefox/.test(userAgent); con...

节点测速工具

https://github.com/faceair/clash-speedtestgo install github.com/faceair/clash-speedtest@latest clash-speedtest -c config.yaml

nvm win10安装

先卸载nodehttps://github.com/coreybutler/nvm-windowshttps://github.com/coreybutler/nvm-windows/releases安装最新版本的 Node: nvm install latest安装 LTS 版本的 Node: nvm install lts安装指定版本: nvm install 14.11.12安装大版本:nvm install 14查看版本:nvm list使用版本:nvm use 14

文字高亮

const regex = new RegExp(searchContent, "gi"); return text.replace(regex,'<span style="color:#286CFB;">$&</span>');

.prettierrc.js 自定义格式化

// .prettierrc 文件:Prettier 规则配置文件 module.exports = { printWidth: 500, // 超过最大值换行 // overrides: [ // { // files: '.prettierrc', // options: { parser: 'json' }, // }, // ], tabWidth: 4, // 缩进字节数 useTabs: false, // 缩进不使用...

Vue2+Tsx 的一个问题

const userInfo: any = UserService.getUserInfo() const userId = userInfo?.userId || 0如上,userId 最后没有使用,会报什么问题?

浏览器麦克风使用

<button type="button" id="start-btn">开始录音</button> <button type="button" id="stop-btn">停止录音</button> <button type="button" id="play-btn">播放录音</button>const startBtn = do...

非对称加密(node-rsa,jsencrypt)

公钥私钥生成随便找个在线生成的http://www.metools.info/code/c80.htmlORconst NodeRSA = require('node-rsa') const fs = require('fs') const newkey = new NodeRSA({ b: 512 }) newkey.setOptions({ encryptionScheme: 'pkcs1' }) let public_key = newkey.exportKey('pkcs8-public') //公钥 let private_key =...