Skip to content

Commit 4971e5f

Browse files
committed
Merge remote-tracking branch 'upstream/master'
# Conflicts: # src/v2/guide/comparison.md Signed-off-by: Bruno Lesieur <[email protected]>
2 parents 2be4238 + a1d4501 commit 4971e5f

35 files changed

+54
-34
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ deploy:
88
update:
99
cd ../vue && \
1010
git checkout -- dist && \
11-
git checkout dev && \
11+
git checkout master && \
1212
npm run build
1313
cp ../vue/dist/vue.min.js themes/vue/source/js/vue.min.js
1414
cp ../vue/dist/vue.js themes/vue/source/js/vue.js

src/images/transition.png

13.3 KB
Loading

src/v2/guide/components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ Vue.component('async-webpack-example', function (resolve) {
10111011
})
10121012
```
10131013

1014-
You can also return a `Promise` in the resolve function, so with Webpack 2 + ES2015 syntax you can do:
1014+
You can also return a `Promise` in the factory function, so with Webpack 2 + ES2015 syntax you can do:
10151015

10161016
``` js
10171017
Vue.component(

src/v2/guide/deployment.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ rollup({
6565

6666
## Pre-Compiling Templates
6767

68-
When using in-DOM templates or in-JavaScript template strings, the template-to-render-function compilation is performed on the fly. This is usually fast enough in most cases, but is best avoided if your application is performance-sensitive. The easiest way to pre-compile templates is using [Single-File Components](./single-file-components.html) - the associated build setups automatically performs pre-compilation for you, so the built code contains the already compiled render functions instead of raw template strings.
68+
When using in-DOM templates or in-JavaScript template strings, the template-to-render-function compilation is performed on the fly. This is usually fast enough in most cases, but is best avoided if your application is performance-sensitive.
69+
70+
The easiest way to pre-compile templates is using [Single-File Components](./single-file-components.html) - the associated build setups automatically performs pre-compilation for you, so the built code contains the already compiled render functions instead of raw template strings.
71+
72+
If you are using Webpack, and prefer separating JavaScript and template files, you can use [vue-template-loader](https://github.com/ktsn/vue-template-loader), which also transforms the template files into JavaScript render functions during the build step.
6973

7074
## Extracting Component CSS
7175

src/v2/guide/ssr.md

+4
Original file line numberDiff line numberDiff line change
@@ -327,3 +327,7 @@ To truly master server-side rendering in complex applications, we recommend a de
327327

328328
- [vue-server-renderer docs](https://www.npmjs.com/package/vue-server-renderer#api): more details on topics covered here, as well as documentation of more advanced topics, such as [preventing cross-request contamination](https://www.npmjs.com/package/vue-server-renderer#why-use-bundlerenderer) and [adding a separate server build](https://www.npmjs.com/package/vue-server-renderer#creating-the-server-bundle)
329329
- [vue-hackernews-2.0](https://github.com/vuejs/vue-hackernews-2.0): the definitive example of integrating all major Vue libraries and concepts in a single application
330+
331+
## Nuxt.js
332+
333+
Properly configuring all the discussed aspects of a production-ready server-rendered app can be a daunting task. Luckily, there is an excellent community project that aims to make all of this easier: [Nuxt.js](https://nuxtjs.org/). Nuxt.js is a higher-level framework built on top of the Vue ecosystem which provides an extremely streamlined development experience for writing universal Vue applications. Better yet, you can even use it as a static site generator (with pages authored as single-file Vue components)! We highly recommend giving it a try.

src/v2/guide/syntax.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The double mustaches interprets the data as plain text, not HTML. In order to ou
3838

3939
The contents are inserted as plain HTML - data bindings are ignored. Note that you cannot use `v-html` to compose template partials, because Vue is not a string-based templating engine. Instead, components are preferred as the fundamental unit for UI reuse and composition.
4040

41-
<p class="tip">Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). Only use HTML interpolation on trusted content and **never** on user-provided content.</p>
41+
<p class="tip">Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS vulnerabilities](https://en.wikipedia.org/wiki/Cross-site_scripting). Only use HTML interpolation on trusted content and **never** on user-provided content.</p>
4242

4343
### Attributes
4444

src/v2/guide/transitions.md

+27-15
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ new Vue({
5050
.fade-enter-active, .fade-leave-active {
5151
transition: opacity .5s
5252
}
53-
.fade-enter, .fade-leave-active {
53+
.fade-enter, .fade-leave-to /* .fade-leave-active in <2.1.8 */ {
5454
opacity: 0
5555
}
5656
```
@@ -76,7 +76,7 @@ new Vue({
7676
.demo-transition-enter-active, .demo-transition-leave-active {
7777
transition: opacity .5s
7878
}
79-
.demo-transition-enter, .demo-transition-leave-active {
79+
.demo-transition-enter, .demo-transition-leave-to {
8080
opacity: 0
8181
}
8282
</style>
@@ -92,12 +92,19 @@ When an element wrapped in a `transition` component is inserted or removed, this
9292

9393
### Transition Classes
9494

95-
There are four classes applied for enter/leave transitions.
95+
There are six classes applied for enter/leave transitions.
9696

97-
1. `v-enter`: Starting state for enter. Applied before element is inserted, removed after one frame.
98-
2. `v-enter-active`: Active and ending state for enter. Applied before element is inserted, removed when transition/animation finishes.
99-
3. `v-leave`: Starting state for leave. Applied when leave transition is triggered, removed after one frame.
100-
4. `v-leave-active`: Active and ending state for leave. Applied when leave transition is triggered, removed when the transition/animation finishes.
97+
1. `v-enter`: Starting state for enter. Added before element is inserted, removed one frame after element is inserted.
98+
99+
2. `v-enter-active`: Active state for enter. Applied during the entire entering phase. Added before element is inserted, removed when transition/animation finishes. This class can be used to define the duration, delay and easing curve for the entering transition.
100+
101+
3. `v-enter-to`: **Only available in versions >=2.1.8.** Ending state for enter. Added one frame after element is inserted (at the same time `v-enter` is removed), removed when transition/animation finishes.
102+
103+
4. `v-leave`: Starting state for leave. Added immediately when a leaving transition is triggered, removed after one frame.
104+
105+
5. `v-leave-active`: Active state for leave. Applied during the entire leaving phase. Added immediately when leave transition is triggered, removed when the transition/animation finishes. This class can be used to define the duration, delay and easing curve for the leaving transition.
106+
107+
6. `v-leave-to`: **Only available in versions >=2.1.8.** Ending state for leave. Added one frame after a leaving transition is triggered (at the same time `v-leave` is removed), removed when the transition/animation finishes.
101108

102109
![Transition Diagram](/images/transition.png)
103110

@@ -138,7 +145,8 @@ new Vue({
138145
.slide-fade-leave-active {
139146
transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
140147
}
141-
.slide-fade-enter, .slide-fade-leave-active {
148+
.slide-fade-enter, .slide-fade-leave-to
149+
/* .slide-fade-leave-active for <2.1.8 */ {
142150
transform: translateX(10px);
143151
opacity: 0;
144152
}
@@ -168,7 +176,7 @@ new Vue({
168176
.slide-fade-leave-active {
169177
transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
170178
}
171-
.slide-fade-enter, .slide-fade-leave-active {
179+
.slide-fade-enter, .slide-fade-leave-to {
172180
transform: translateX(10px);
173181
opacity: 0;
174182
}
@@ -320,8 +328,10 @@ You can also specify custom transition classes by providing the following attrib
320328

321329
- `enter-class`
322330
- `enter-active-class`
331+
- `enter-to-class` (>= 2.1.8 only)
323332
- `leave-class`
324333
- `leave-active-class`
334+
- `leave-to-class` (>= 2.1.8 only)
325335

326336
These will override the conventional class names. This is especially useful when you want to combine Vue's transition system with an existing CSS animation library, such as [Animate.css](https://daneden.github.io/animate.css/).
327337

@@ -914,7 +924,8 @@ new Vue({
914924
.component-fade-enter-active, .component-fade-leave-active {
915925
transition: opacity .3s ease;
916926
}
917-
.component-fade-enter, .component-fade-leave-active {
927+
.component-fade-enter, .component-fade-leave-to
928+
/* .component-fade-leave-active for <2.1.8 */ {
918929
opacity: 0;
919930
}
920931
```
@@ -931,7 +942,7 @@ new Vue({
931942
.component-fade-enter-active, .component-fade-leave-active {
932943
transition: opacity .3s ease;
933944
}
934-
.component-fade-enter, .component-fade-leave-active {
945+
.component-fade-enter, .component-fade-leave-to {
935946
opacity: 0;
936947
}
937948
</style>
@@ -1010,7 +1021,7 @@ new Vue({
10101021
.list-enter-active, .list-leave-active {
10111022
transition: all 1s;
10121023
}
1013-
.list-enter, .list-leave-active {
1024+
.list-enter, .list-leave-to /* .list-leave-active for <2.1.8 */ {
10141025
opacity: 0;
10151026
transform: translateY(30px);
10161027
}
@@ -1054,7 +1065,7 @@ new Vue({
10541065
.list-enter-active, .list-leave-active {
10551066
transition: all 1s;
10561067
}
1057-
.list-enter, .list-leave-active {
1068+
.list-enter, .list-leave-to {
10581069
opacity: 0;
10591070
transform: translateY(30px);
10601071
}
@@ -1185,7 +1196,8 @@ new Vue({
11851196
display: inline-block;
11861197
margin-right: 10px;
11871198
}
1188-
.list-complete-enter, .list-complete-leave-active {
1199+
.list-complete-enter, .list-complete-leave-to
1200+
/* .list-complete-leave-active for <2.1.8 */ {
11891201
opacity: 0;
11901202
transform: translateY(30px);
11911203
}
@@ -1235,7 +1247,7 @@ new Vue({
12351247
display: inline-block;
12361248
margin-right: 10px;
12371249
}
1238-
.list-complete-enter, .list-complete-leave-active {
1250+
.list-complete-enter, .list-complete-leave-to {
12391251
opacity: 0;
12401252
transform: translateY(30px);
12411253
}

themes/vue/layout/layout.ejs

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!DOCTYPE html>
33
<html lang="en">
44
<head>
5-
<title><%- page.title ? page.title + ' - ' : '' %>vue.js</title>
5+
<title><%- page.title ? page.title + ' - ' : '' %>Vue.js</title>
66
<meta charset="utf-8">
77
<meta name="description" content="<%- theme.site_description %>">
88
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
@@ -28,6 +28,17 @@
2828
<!-- this needs to be loaded before guide's inline scripts -->
2929
<script src="/js/vue.js"></script>
3030
<script>window.PAGE_TYPE = "<%- page.type %>"</script>
31+
32+
<!-- ga -->
33+
<script>
34+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
35+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
36+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
37+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
38+
39+
ga('create', '<%- theme.google_analytics %>', '<%- theme.root_domain %>');
40+
ga('send', 'pageview');
41+
</script>
3142
</head>
3243
<body class="<%- isIndex ? '' : 'docs' -%>">
3344
<div id="mobile-bar" <%- isIndex ? 'class="top"' : '' %>>
@@ -51,17 +62,6 @@
5162
<!-- main custom script for sidebars, version selects etc. -->
5263
<script src="/js/common.js"></script>
5364

54-
<!-- ga -->
55-
<script>
56-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
57-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
58-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
59-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
60-
61-
ga('create', '<%- theme.google_analytics %>', '<%- theme.root_domain %>');
62-
ga('send', 'pageview');
63-
</script>
64-
6565
<!-- search -->
6666
<link href="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" rel='stylesheet' type='text/css'>
6767
<%- css('css/search') %>

themes/vue/source/css/_demo.styl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#demo, .demo
1+
#demo, .demo, .content .demo
22
border 1px solid #eee
33
border-radius $radius
44
padding 25px 35px

themes/vue/source/images/2mhost.png

-10.1 KB
Loading
-6.5 KB
Loading

themes/vue/source/images/chaitin.png

-2.45 KB
Loading

themes/vue/source/images/check.png

-99 Bytes
Loading

themes/vue/source/images/down.png

-900 Bytes
Loading

themes/vue/source/images/feed.png

-710 Bytes
Loading
-18.7 KB
Loading

themes/vue/source/images/icons.png

-3.07 KB
Loading

themes/vue/source/images/itunescn.png

-2.22 KB
Loading

themes/vue/source/images/jsfiddle.png

-4.3 KB
Loading

themes/vue/source/images/juejin.png

-8.3 KB
Loading

themes/vue/source/images/laravel.png

-6.85 KB
Loading

themes/vue/source/images/logo.png

-7.11 KB
Loading

themes/vue/source/images/menu.png

-82 Bytes
Loading
-7.57 KB
Loading

themes/vue/source/images/patreon.png

-2.12 KB
Loading

themes/vue/source/images/paypal.png

-572 Bytes
Loading

themes/vue/source/images/search.png

-1.27 KB
Loading

themes/vue/source/images/someline.png

-4.03 KB
Loading
-4.86 KB
Loading

themes/vue/source/images/tde.png

-3.14 KB
Loading
-21.1 KB
Binary file not shown.

themes/vue/source/images/trisoft.png

-21.4 KB
Loading

themes/vue/source/images/vuejobs.png

-31.2 KB
Loading

themes/vue/source/js/vue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* Vue.js v2.1.8
3-
* (c) 2014-2016 Evan You
3+
* (c) 2014-2017 Evan You
44
* Released under the MIT License.
55
*/
66
(function (global, factory) {

themes/vue/source/js/vue.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)