摘要: class Singleton { constructor() { this.conn = this.connect(); } static getInstance() { if (!Singleton.instance) { Singleton.instance = new Singleton(); ... 阅读全文
posted @ 2019-05-16 23:34 不知不觉、 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 第一种 /** * 链表节点类 */ class Node { constructor(ele) { this.ele = ele; this.next = null; } } /** * 链表类 */ class NodeList { constructor(ele) { this.head = 阅读全文
posted @ 2019-05-16 23:12 不知不觉、 阅读(676) 评论(0) 推荐(0) 编辑
摘要: function main(keywords,data){ function fn(arr){ var flag = false; for(var i = 0;i 0){ var res = fn(item.children); if(res){ item.isHidden = false; if(!i... 阅读全文
posted @ 2019-05-16 16:36 不知不觉、 阅读(509) 评论(0) 推荐(0) 编辑