摘要: 1.安装 xlsx npm install xlsx 2.创建exportUtils.js文件 /** * 导出表格数据为多种格式 * @param {Array} data - 要导出的数据数组 * @param {String} fileName - 文件名(不带扩展名) * @param {S 阅读全文
posted @ 2025-11-20 10:47 yw3692582 阅读(1) 评论(0) 推荐(0)
摘要: // 通用iframe嵌入层弹窗函数 /** * @param {String} width 弹出层宽度(可缺省,默认:1200px) * @param {String} height 弹出层高度(可缺省,默认:800px) * @param {String} title 弹出层左上角标题(可缺省, 阅读全文
posted @ 2025-07-17 10:42 yw3692582 阅读(15) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Chessboard Detection</title> </head> <body> <canvas id="canvas"></canvas> <scr 阅读全文
posted @ 2025-07-16 17:31 yw3692582 阅读(14) 评论(0) 推荐(0)
摘要: function containsPositionTermsRegex(str) { const regex = /定位|反位|左位|右位/; return regex.test(str); } // 示例 const inputString = "这是一个包含左位和右位的字符串。"; const 阅读全文
posted @ 2025-06-23 16:34 yw3692582 阅读(55) 评论(0) 推荐(0)
摘要: let gapPic = document.getElementById('gapPic') let rect = gapPic.getBoundingClientRect() // 获取宽高 console.log(rect.width, rect.height) 阅读全文
posted @ 2025-06-12 09:19 yw3692582 阅读(14) 评论(0) 推荐(0)
摘要: <template> <div> <div style="height: 60px; line-height: 60px"> <el-radio v-model="checked" :label="false">一次性</el-radio> <el-radio v-model="checked" : 阅读全文
posted @ 2025-05-20 13:37 yw3692582 阅读(136) 评论(0) 推荐(0)
摘要: let reader = new FileReader(); reader.onload = (event) => { let binaryString = event.target.result; console.log(binaryString) }; // reader.readAsArray 阅读全文
posted @ 2025-02-20 17:03 yw3692582 阅读(13) 评论(0) 推荐(0)
摘要: 参考地址:https://gitee.com/qxscj/js-demo/blob/master/html+css/53.html# 阅读全文
posted @ 2024-12-25 14:39 yw3692582 阅读(11) 评论(0) 推荐(0)
摘要: let element = document.getElementById('pic') html2canvas(element).then(canvas => { let layer_pic = canvas.toDataURL('image/png') let byteCharacters = 阅读全文
posted @ 2024-11-22 17:12 yw3692582 阅读(199) 评论(0) 推荐(0)
摘要: async export_data() { let zip = new JSZip() // 下载文件并添加到 ZIP for (const i of this.tableData) { const data = await fetch(i.path).then(response => respon 阅读全文
posted @ 2024-11-08 10:45 yw3692582 阅读(392) 评论(0) 推荐(0)