每日小结

用 Hexo 搭建了个人 blog

#Hexo 基本操作

  • 安装

    npm install -g hexo-cli

  • 初始化hexo

    hexo init

    • 当前目录必须是空的
  • 新建文章

    hexo new [layout] name

    • layout 可以是 post, page, draft 之一

    • 分别保存至 source/_posts, source, source/_drafts 中

    • 新建文件名可以在 _config.yml 里面指定, new_post_name, 默认为 name.md

  • 临时开启 server

    hexo server

React 入门

#复习 JavaScript

Vue 和 React 路由模块的区别

#Vue 路由

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
new Router({
mode: 'history',
routes: [
{
path: '/inspect',
component: Layout,
redirect: '/inspect/table1',
name: '报表',
meta: { title: '报表', icon: 'table' },
children: [
{
path: 'table1',
name: 'Table',
component: () => import('@/views/table/index'),
meta: { title: 'Table', icon: 'table' }
},
]
},
]
})

Vue 深入 —— MVVM 框架

  • Observer 数据劫持

  • Dep/Watcher 发布订阅

  • Compiler 解析 {{ }}, 创建watcher, 求解表达式