随笔分类 - js
摘要:使用场景 后端传递嵌套数据 菜单权限等 树结构转数组 /** * 树结构转数组 * @param {Object} arr 树结构 */ export const treeToList = (arr) => { let tree = JSON.parse(JSON.stringify(arr));
阅读全文
摘要:文字转语音 SpeechSynthesisUtterance是HTML5中新增的API,用于将指定文字合成为对应的语音 function sayTTS(content) { const synth = window.speechSynthesis; const msg = new SpeechSyn
阅读全文
摘要:1.按钮 <el-button @mousedown="down" @touchstart="down" @mousemove="move" @touchmove="move" @mouseup="end" @touchend="end" @touchcancel="end" > </el-butt
阅读全文