![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JS
zhangyouxiu66
这个作者很懒,什么都没留下…
展开
-
将对象处理成字符串
// 对象处理成字符串 "{"330000829309":",VALUE,LJVALUE,TBZ"}" indicatorMap2String(strMap) { let obj = Object.create(null); for (let [k, v] of strMap) { let p = ""; v.forEach((value) => { p = value + "," + p; ...原创 2022-03-28 22:05:08 · 131 阅读 · 0 评论 -
递归生成树
getTreeData(data) { // 循环遍历json数据 for (var i = 0; i < data.length; i++) { if (data[i].children.length < 1) { // children若为空数组,则将children设为undefined data[i].children = undefined; } else { ...原创 2022-03-28 22:03:44 · 120 阅读 · 0 评论 -
两个对象数组合并
var list1 = [ { title: '名称1', age: '18' }, { title: '名称2', age: '19' }, { title: '名称3', age: '20' .原创 2021-10-27 15:44:04 · 184 阅读 · 0 评论 -
兼容性网页全屏
fullScreen(){ // this.flag=!this.flagletelement=document.documentElement;this.isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElementconsole.l...原创 2021-09-23 15:18:17 · 201 阅读 · 0 评论