Skip to content

Commit 596511e

Browse files
Merge branch 'master' of https://github.com/vuejs/vuejs.org
2 parents ca15810 + 69106b2 commit 596511e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+52496
-233
lines changed

β€Ž.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Note
22
====
3-
We're currently in the process of migrating Vue's documentation to v3. To ensure smooth progress, only PR's that fix critical bugs and/or misinformation will be accepted. If yours is not one of them, consider [creating an issue](https://github.com/vuejs/vuejs.org/issues/new) instead and we will label it as `post-3.0` for later tackling.
3+
This repository is for Vue 1.x and 2.x only. Issues and pull requests related to 3.x are managed in the v3 doc repo: https://github.com/vuejs/docs-next.

β€ŽREADME.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# vuejs.org
22

3+
> Important: This repository is for Vue 1.x and 2.x only. Issues and pull requests related to 3.x are managed in the [v3 doc repo](https://github.com/vuejs/docs-next).
4+
35
This site is built with [hexo](http://hexo.io/). Site content is written in Markdown format located in `src`. Pull requests welcome!
46

57
## Writing

β€Žsrc/v2/api/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,10 +1382,14 @@ type: api
13821382
13831383
- **Read only**
13841384
1385+
- **Reactive?** No
1386+
13851387
- **Details:**
13861388
13871389
Used to programmatically access content [distributed by slots](../guide/components.html#Content-Distribution-with-Slots). Each [named slot](../guide/components.html#Named-Slots) has its own corresponding property (e.g. the contents of `v-slot:foo` will be found at `vm.$slots.foo`). The `default` property contains either nodes not included in a named slot or contents of `v-slot:default`.
13881390
1391+
Please note that slots are **not** reactive. If you need a component to re-render based on changes to data passed to a slot, we suggest considering a different strategy that relies on a reactive instance option, such as `props` or `data`.
1392+
13891393
**Note:** `v-slot:foo` is supported in v2.6+. For older versions, you can use the [deprecated syntax](../guide/components-slots.html#Deprecated-Syntax).
13901394
13911395
Accessing `vm.$slots` is most useful when writing a component with a [render function](../guide/render-function.html).

β€Žsrc/v2/guide/comparison.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ React is renowned for its steep learning curve. Before you can really get starte
111111
While Vue scales up just as well as React, it also scales down just as well as jQuery. That's right - to get started, all you have to do is drop a single script tag into the page:
112112

113113
``` html
114-
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
114+
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
115115
```
116116

117117
Then you can start writing Vue code and even ship the minified version to production without feeling guilty or having to worry about performance problems.

β€Žsrc/v2/guide/components-dynamic-async.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ new Vue({
106106
background: #f0f0f0;
107107
margin-bottom: -1px;
108108
margin-right: -1px;
109+
overflow-anchor: none;
109110
}
110111
.dynamic-component-demo-tab-button:hover {
111112
background: #e0e0e0;

β€Žsrc/v2/guide/components-props.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ This pattern allows you to use base components more like raw HTML elements, with
347347

348348
```html
349349
<base-input
350+
label="Username:"
350351
v-model="username"
351352
required
352353
placeholder="Enter your username"

β€Žsrc/v2/guide/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ The easiest way to try out Vue.js is using the [Hello World example](https://cod
2424

2525
``` html
2626
<!-- development version, includes helpful console warnings -->
27-
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
27+
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
2828
```
2929

3030
or:
3131

3232
``` html
3333
<!-- production version, optimized for size and speed -->
34-
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
34+
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
3535
```
3636

3737
The [Installation](installation.html) page provides more options of installing Vue. Note: We **do not** recommend that beginners start with `vue-cli`, especially if you are not yet familiar with Node.js-based build tools.

β€Žsrc/v2/guide/installation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Simply download and include with a script tag. `Vue` will be registered as a glo
4141
For prototyping or learning purposes, you can use the latest version with:
4242

4343
``` html
44-
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
44+
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
4545
```
4646

4747
For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions:
@@ -84,7 +84,7 @@ Vue provides an [official CLI](https://github.com/vuejs/vue-cli) for quickly sca
8484

8585
## Explanation of Different Builds
8686

87-
In the [`dist/` directory of the NPM package](https://cdn.jsdelivr.net/npm/vue/dist/) you will find many different builds of Vue.js. Here's an overview of the difference between them:
87+
In the [`dist/` directory of the NPM package](https://cdn.jsdelivr.net/npm/vue@2/dist/) you will find many different builds of Vue.js. Here's an overview of the difference between them:
8888

8989
| | UMD | CommonJS | ES Module (for bundlers) | ES Module (for browsers) |
9090
| --- | --- | --- | --- | --- |
@@ -101,7 +101,7 @@ In the [`dist/` directory of the NPM package](https://cdn.jsdelivr.net/npm/vue/d
101101

102102
- **Runtime**: code that is responsible for creating Vue instances, rendering and patching virtual DOM, etc. Basically everything minus the compiler.
103103

104-
- **[UMD](https://github.com/umdjs/umd)**: UMD builds can be used directly in the browser via a `<script>` tag. The default file from jsDelivr CDN at [https://cdn.jsdelivr.net/npm/vue](https://cdn.jsdelivr.net/npm/vue) is the Runtime + Compiler UMD build (`vue.js`).
104+
- **[UMD](https://github.com/umdjs/umd)**: UMD builds can be used directly in the browser via a `<script>` tag. The default file from jsDelivr CDN at [https://cdn.jsdelivr.net/npm/vue@2](https://cdn.jsdelivr.net/npm/vue@2) is the Runtime + Compiler UMD build (`vue.js`).
105105

106106
- **[CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1)**: CommonJS builds are intended for use with older bundlers like [browserify](http://browserify.org/) or [webpack 1](https://webpack.github.io). The default file for these bundlers (`pkg.main`) is the Runtime only CommonJS build (`vue.runtime.common.js`).
107107

β€Žsrc/v2/guide/instance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ A Vue application consists of a **root Vue instance** created with `new Vue`, op
2424
Root Instance
2525
└─ TodoList
2626
β”œβ”€ TodoItem
27-
β”‚ β”œβ”€ DeleteTodoButton
28-
β”‚ └─ EditTodoButton
27+
β”‚ β”œβ”€ TodoButtonDelete
28+
β”‚ └─ TodoButtonEdit
2929
└─ TodoListFooter
30-
β”œβ”€ ClearTodosButton
30+
β”œβ”€ TodosButtonClear
3131
└─ TodoListStatistics
3232
```
3333

β€Žsrc/v2/guide/syntax.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ These expressions will be evaluated as JavaScript in the data scope of the owner
9898
{{ if (ok) { return message } }}
9999
```
100100

101-
<p class="tip">Template expressions are sandboxed and only have access to a [whitelist of globals](https://github.com/vuejs/vue/blob/v2.6.10/src/core/instance/proxy.js#L9) such as `Math` and `Date`. You should not attempt to access user defined globals in template expressions.</p>
101+
<p class="tip">Template expressions are sandboxed and only have access to a [whitelist of globals](https://github.com/vuejs/vue/blob/v2.6.10/src/core/instance/proxy.js#L9) such as `Math` and `Date`. You should not attempt to access user-defined globals in template expressions.</p>
102102

103103
## Directives
104104

@@ -167,7 +167,7 @@ Dynamic argument expressions have some syntax constraints because certain charac
167167

168168
The workaround is to either use expressions without spaces or quotes, or replace the complex expression with a computed property.
169169

170-
When using in-DOM templates (templates directly written in an HTML file), you should also avoid naming keys with uppercase characters, as browsers will coerce attribute names into lowercase:
170+
When using in-DOM templates (i.e., templates written directly in an HTML file), you should also avoid naming keys with uppercase characters, as browsers will coerce attribute names into lowercase:
171171

172172
``` html
173173
<!--

0 commit comments

Comments
Β (0)