{"action":"created","issue":{"url":"https://api.github.com/repos/zliuwd/learningnote/issues/106","repository_url":"https://api.github.com/repos/zliuwd/learningnote","labels_url":"https://api.github.com/repos/zliuwd/learningnote/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/zliuwd/learningnote/issues/106/comments","events_url":"https://api.github.com/repos/zliuwd/learningnote/issues/106/events","html_url":"https://github.com/zliuwd/learningnote/issues/106","id":269415173,"number":106,"title":"Myblog实战记录","user":{"login":"zliuwd","id":25130704,"avatar_url":"https://avatars0.githubusercontent.com/u/25130704?v=4","gravatar_id":"","url":"https://api.github.com/users/zliuwd","html_url":"https://github.com/zliuwd","followers_url":"https://api.github.com/users/zliuwd/followers","following_url":"https://api.github.com/users/zliuwd/following{/other_user}","gists_url":"https://api.github.com/users/zliuwd/gists{/gist_id}","starred_url":"https://api.github.com/users/zliuwd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zliuwd/subscriptions","organizations_url":"https://api.github.com/users/zliuwd/orgs","repos_url":"https://api.github.com/users/zliuwd/repos","events_url":"https://api.github.com/users/zliuwd/events{/privacy}","received_events_url":"https://api.github.com/users/zliuwd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2017-10-29T16:54:51Z","updated_at":"2017-12-27T11:10:38Z","closed_at":null,"author_association":"OWNER","body":"# 如何运行\r\n1、开启mongodb，运行mongod命令\r\n2、开启入口程序，例如index.js， nodemon index.js\r\n\r\n# 本project的设计tricky\r\n1. 在quitenewpost的时候，使用双quite，即在触发postsni.js里的quitnewpost的同时，让postsni也触发bottompart的btquitnewpost，这样可以在后来home键被再次点击的时候保持原貌。\r\n\r\n2.navbar如何触发兄弟component postsni? 那么既然这样为什么要让bottompart里面也保留ifnewpost的state呢，这是因为newpost的触发点在navbar里面，他是这么个过程:\r\n```\r\n  navbar触发=》改变bottompart的ifnewpost=》然后导致bottompart刷新=》然后由于bottompart的 ifnewpost state以props的形式传递给postsni 作为其初始state,并且设置了willreceiveprops来检测props的变化所以会导致postsni刷新。\r\n```"},"comment":{"url":"https://api.github.com/repos/zliuwd/learningnote/issues/comments/354097955","html_url":"https://github.com/zliuwd/learningnote/issues/106#issuecomment-354097955","issue_url":"https://api.github.com/repos/zliuwd/learningnote/issues/106","id":354097955,"user":{"login":"zliuwd","id":25130704,"avatar_url":"https://avatars0.githubusercontent.com/u/25130704?v=4","gravatar_id":"","url":"https://api.github.com/users/zliuwd","html_url":"https://github.com/zliuwd","followers_url":"https://api.github.com/users/zliuwd/followers","following_url":"https://api.github.com/users/zliuwd/following{/other_user}","gists_url":"https://api.github.com/users/zliuwd/gists{/gist_id}","starred_url":"https://api.github.com/users/zliuwd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zliuwd/subscriptions","organizations_url":"https://api.github.com/users/zliuwd/orgs","repos_url":"https://api.github.com/users/zliuwd/repos","events_url":"https://api.github.com/users/zliuwd/events{/privacy}","received_events_url":"https://api.github.com/users/zliuwd/received_events","type":"User","site_admin":false},"created_at":"2017-12-27T11:10:38Z","updated_at":"2017-12-27T11:10:38Z","author_association":"OWNER","body":"# 制作下拉菜单的要诀\r\n```\r\nconst fcarea = document.querySelector('.menufc');\r\n    const pcats = document.querySelector('.catmenu');\r\n    const ncatlist = document.querySelector('.navcatlist');\r\n\r\n    fcarea.onmouseenter = () => {\r\n      ncatlist.style.display = 'list-item';\r\n    };\r\n    fcarea.onmouseleave = () => {\r\n      ncatlist.style.display = 'none';\r\n    };\r\n\r\n    pcats.onmouseover = () => {\r\n      ncatlist.style.display = 'list-item';\r\n    };\r\n```\r\n## 注意：\r\n1. 做菜单要三个层，第一个层是触发，第二个层是触发后显示，第三个层是聚焦区域，聚焦区域fcarea应当包含触发和展示层两个，并且index要设置够高。\r\n2.list-item 如果遇到ul不显示前面点的情况需要加display:list-item."}}
{"actor":{"display_login":"zliuwd"}}