摘要: class Router { constructor() { this.routes = [] } handle(pattern, handler) { this.routes.push({ pattern, handler }) } exec(pathname) { for (const rout 阅读全文
posted @ 2018-07-10 20:22 wanhong 阅读(492) 评论(0) 推荐(0)