Quellcode durchsuchen

使用 docute 文档工具

HcySunYang vor 8 Jahren
Ursprung
Commit
3b7adf4a3d

+ 20 - 0
LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 HcySunYang
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 10 - 3
README.md

@@ -2,10 +2,17 @@
 
 这里是所有关于Vue源码分析的文章初稿
 
-#### 如何阅读
+### 如何阅读
 
 这系列文章与 Vue `dev` 分支的源码保持同步,你只需要检出Vue `dev` 分支的代码即可对照阅读。注意:*我每天都会查看是否有更新,尽量保证文章的跟新速度与源码持平,偶尔会有延迟,敬请谅解。*
 
-#### 目录
+### 目录
 
-###### 了解 Vue 这个项目
+##### [前言](/note/前言)
+##### [了解 Vue 这个项目](/note/了解Vue这个项目)
+##### [Vue构造函数](/note/Vue构造函数)
+
+### 附录
+
+##### [附录/Vue构造函数整理-原型](/note/附录/Vue构造函数整理-原型)
+##### [附录/Vue构造函数整理-全局API](/note/附录/Vue构造函数整理-全局API)

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
asset/docute.css


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
asset/docute.js


+ 39 - 0
index.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
+    <title>docs</title>
+    <link rel="stylesheet" href="./asset/docute.css">
+    <style>
+        .markdown-body h5 {
+            font-size: .85em;
+            color: #C43C3C;
+        }
+        .markdown-body h6 {
+            font-size: .85em;
+            color: #ff9917;
+        }
+    </style>
+</head>
+<body>
+    <div id="app"></div>
+
+    <script src="./asset/docute.js"></script>
+    <script>
+    docute.init({
+        icons: [{
+            icon: 'link',
+            label: 'my blog',
+            link: 'http://hcysun.me'
+        },{
+            icon: 'github',
+            label: 'Star me on GitHub',
+            link: 'https://github.com/HcySunYang/analyze-vue'
+        }],
+        tocVisibleDepth: 6
+    })
+    </script>
+</body>
+</html>

+ 8 - 4
Vue构造函数.md → note/Vue构造函数.md

@@ -1,5 +1,7 @@
 ## Vue 构造函数
 
+#### Vue 构造函数的原型
+
 在 [了解 Vue 这个项目](./了解Vue这个项目.md) 一节中,我们在最后提到这套文章将会以 `npm run dev` 为切入点:
 
 ```js
@@ -223,6 +225,8 @@ Vue.prototype._g = bindObjectListeners
 ```
 至此,`instance/index.js` 文件中的代码就运行完毕了(注意:所谓的运行,是指执行 `npm run dev` 命令时构建的运行)。我们大概清楚每个 `*Mixin` 方法的作用其实就是包装 `Vue.prototype`,在其上挂载一些属性和方法,下面我们要做一件很重要的事情,就是将上面的内容集中合并起来,放单一个单独的地方,便于以后查看,我将它们整理到了这里:[附录/Vue 构造函数整理-原型](./附录/Vue构造函数整理-原型.md),其中 `对原型的包装一节` 是对上面内容的整理,这样当我们在后面的详细讲解的时候,提到某个方法你就可以迅速定位它的位置,便于我们思路的清晰。
 
+#### Vue 构造函数的静态属性和方法(全局API)
+
 到目前为止,`core/instance/index.js` 文件,也就是 `Vue` 的出生文件的代码我们就看完了,按照之前我们寻找Vue构造函数时的文件路径回溯,下一个我们要看的文件应该就是 `core/index.js` 文件,这个文件将 `Vue` 从 `core/instance/index.js` 文件中导入了进来,我们打开 `core/index.js` 文件,下面是其全部的代码,同样很简短易看:
 
 ```js
@@ -415,10 +419,10 @@ extend(Vue.options.components, builtInComponents)
 的意思就是将 `builtInComponents` 的属性混合到 `Vue.options.components` 中,其中 `builtInComponents` 来自于 `core/components/index.js` 文件,该文件如下:
 
 ```js
-import KeepAlive from './keep-alive'
-
-export default {
-  KeepAlive
+import KeepAlive from './keep-alive'
+
+export default {
+  KeepAlive
 }
 ```
 

+ 0 - 0
了解Vue这个项目.md → note/了解Vue这个项目.md


+ 0 - 0
前言.md → note/前言.md


+ 0 - 0
工具方法.md → note/工具方法.md


+ 0 - 0
附录/Vue构造函数整理-全局API.md → note/附录/Vue构造函数整理-全局API.md


+ 0 - 0
附录/Vue构造函数整理-原型.md → note/附录/Vue构造函数整理-原型.md


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.