摘要: 初始化echarts实例 my2Chart = echarts.init(myChartas); 直接C my2Chart.getZr().on("click", (params) => { let pointInPixel = [params.offsetX, params.offsetY]; i 阅读全文
posted @ 2024-08-07 14:40 QinHaoRan 阅读(409) 评论(0) 推荐(0)
摘要: const WebSocket = require("ws"); //开一个8080的端口 const WebSockets = new WebSocket.Server({ port: 8080 }); //链接 WebSockets.on("connection", function conne 阅读全文
posted @ 2024-04-24 09:44 QinHaoRan 阅读(13) 评论(0) 推荐(0)
摘要: 这里我用的是阿里图标库 1. 2. 3. 4.在vue的assets文件中增加一个font文件把解压后的文件复制进去,并在mian.js中引入iconfont.css 5.1.使用,复制以下代码 在页面中使用 <h1>欢迎 <i class="iconfont">&#xe67c;</i></h1> 阅读全文
posted @ 2024-04-19 09:36 QinHaoRan 阅读(32) 评论(0) 推荐(0)
摘要: 准备工作 npm install qrcodejs2 --save 使用页面引入 import QRCode from "qrcodejs2"; html代码 <div> <div v-for="(v, index) in printList " :id="'printDiv' + index" : 阅读全文
posted @ 2024-04-17 15:13 QinHaoRan 阅读(106) 评论(0) 推荐(0)
摘要: const http = require("http"); const server = http.createServer((req, res) => { res.setHeader("content-type", "text/html;charset=utf-8"); // 提取http报文 / 阅读全文
posted @ 2024-02-19 15:49 QinHaoRan 阅读(29) 评论(0) 推荐(0)
摘要: // resolve 拼接 // const ad = path.resolve(__dirname, "./ccc/00-aa.txt"); // console.log(ad); // sep 分隔符;//windows \ linux / // console.log(path.sep); / 阅读全文
posted @ 2024-02-19 11:02 QinHaoRan 阅读(9) 评论(0) 推荐(0)
摘要: // 查看资源状态方法 fs.stat("zzsy.txt", (err, stats) => { if (err) { console.log(err); } console.log(stats); // stats.isFile(); // 验证是不是文件 isFile // 验证是不是文件夹 阅读全文
posted @ 2024-02-19 09:27 QinHaoRan 阅读(31) 评论(0) 推荐(0)
摘要: // 文件夹的创建 // fs.mkdir("./ztest", (err) => { // if (err) { // console.log(err); // } else { // console.log("文件夹创建成功"); // } // }); // 递归创建 // { recursi 阅读全文
posted @ 2024-02-18 16:43 QinHaoRan 阅读(22) 评论(0) 推荐(0)
摘要: 直接粘贴无脑用 !!!vue文件执行要现在初始化方法里面调用一下 onclickS() { let raycaster = new THREE.Raycaster(); let mouse = new THREE.Vector2(); function onmodelclick(event) { m 阅读全文
posted @ 2024-02-18 16:06 QinHaoRan 阅读(276) 评论(0) 推荐(0)
摘要: const fs = require("fs"); 写入 // 异步写入 // writeFile也可以追加写入,在回调函数之前增加{flag:'a'}即可。 // fs.writeFile("./texx.txt", "实验操作", (err) => { // if (err) throw err 阅读全文
posted @ 2024-02-18 15:16 QinHaoRan 阅读(18) 评论(0) 推荐(0)