js
秋风98
这个作者很懒,什么都没留下…
展开
-
系统判断 移动端则跳转
//系统判断 移动端则跳转 if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { window.location.replace("../mobile/index.html"); }原创 2022-03-24 20:06:20 · 161 阅读 · 0 评论 -
递归列表树
//递归列表树 foo1(data, id, parentId, children, rootId) { id = id || 'id' parentId = parentId || 'categoryId' children = children || 'children' rootId = rootId || Math.min.apply(Math, data.map(item => { return原创 2021-09-02 15:52:56 · 111 阅读 · 0 评论 -
前端下载文档流
//创建一个隐藏的a连接,const link = document.createElement('a');let blob = new Blob([res], {type: 'application/vnd.ms-excel;charset=utf-8'});link.style.display = 'none';//设置连接link.href = URL.createObjectURL(blob);link.download = '需求反馈导出文件'; document.body.appe原创 2021-06-21 16:17:54 · 147 阅读 · 0 评论