摘要: function upload() { const fileInput = document.getElementById('fileInput'); const file = fileInput.files[0]; const chunkSize = 1024 * 1024; // 每个分片的大小 阅读全文
posted @ 2024-06-14 10:16 卢老师不想编程 阅读(3) 评论(0) 推荐(0) 编辑
摘要: const startButton = document.getElementById('chart_button'); const inputText = document.getElementById('chatui_input'); // init recognition const reco 阅读全文
posted @ 2024-04-26 12:01 卢老师不想编程 阅读(102) 评论(0) 推荐(0) 编辑
摘要: https://registry.npmmirror.com/binary.html?path=chromium-browser-snapshots/Win_x64/ 手动下载安装包 修改文件 C:\Users\luyan\AppData\Local\Programs\Python\Python31 阅读全文
posted @ 2024-04-22 16:50 卢老师不想编程 阅读(148) 评论(0) 推荐(0) 编辑
摘要: npm i puppeteer index.js const puppeteer = require('puppeteer'); async function translateText(text, sl, tl) { const browser = await puppeteer.launch() 阅读全文
posted @ 2024-04-22 14:39 卢老师不想编程 阅读(24) 评论(0) 推荐(0) 编辑
摘要: const XLSX = require('xlsx'); const fs = require('fs'); const workbook = XLSX.readFile('base.xlsx'); const sheetName = workbook.SheetNames[0]; const w 阅读全文
posted @ 2024-04-19 08:59 卢老师不想编程 阅读(16) 评论(0) 推荐(0) 编辑
摘要: iframe.addEventListener('load', function () { do something }); REACT const iframeRef = useRef(null); useEffect(() => { const iframe = iframeRef.curren 阅读全文
posted @ 2024-03-01 09:19 卢老师不想编程 阅读(173) 评论(0) 推荐(0) 编辑
摘要: BUTTON 发送消息 selectButton.addEventListener('click', () => { iframe.contentWindow.postMessage({ event_id: "select_media", return_type: 'media' }, '*'); 阅读全文
posted @ 2024-02-20 16:03 卢老师不想编程 阅读(294) 评论(0) 推荐(0) 编辑
摘要: import ttf from "./assets/font/Fira_Sans/FiraSans-Regular.ttf" import ttf2 from "./assets/font/Fira_Sans/FiraSans-Thin.ttf" const setFontFamily = (doc 阅读全文
posted @ 2024-02-05 09:22 卢老师不想编程 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 在需要滚动的元素内部添加一层div ,并添加样式:position:absolute; 父级样式添加 position: relative;即可 <div className="pcCommon_left_top"> <div style={{position:'absolute',width:'c 阅读全文
posted @ 2024-02-05 08:49 卢老师不想编程 阅读(110) 评论(0) 推荐(0) 编辑
摘要: js代码 const [collapse, setCollapse] = useState(false) const [showBack, setShowBack] = useState(false) const changeCollapse = () => { // 获取展开收起目标元素 cons 阅读全文
posted @ 2024-02-02 15:41 卢老师不想编程 阅读(204) 评论(0) 推荐(0) 编辑