8000 Update transitions.md by jhserodio · Pull Request #237 · vuejs/v2.vuejs.org · GitHub
[go: up one dir, main page]

Skip to content

Update transitions.md #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/guide/transitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ When an element with transition is inserted or removed, Vue will:
A typical CSS transition looks like this:

``` html
<div v-if="show" transition="expand">hello</div>
<div id="app">
<div v-if="show" transition="expand">hello</div>
<button @click="toggle">botao</button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does botao mean?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trigger for transition 'expend', like the exemple

2016-02-16 14:58 GMT-02:00 Evan You notifications@github.com:

In src/guide/transitions.md
#237 (comment):

@@ -35,7 +35,10 @@ When an element with transition is inserted or removed, Vue will:
A typical CSS transition looks like this:

-<div v-if="show" transition="expand">hello</div>
+<div id="app">
+    <div v-if="show" transition="expand">hello</div>
+    <button @click="toggle">botao</button>

What does botao mean?


Reply to this email directly or view it on GitHub
https://github.com/vuejs/vuejs.org/pull/237/files#r53040880.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, we should probably use toggle here so everyone can understand?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for beginners, yes

2016-02-16 15:47 GMT-02:00 Evan You notifications@github.com:

In src/guide/transitions.md
#237 (comment):

@@ -35,7 +35,10 @@ When an element with transition is inserted or removed, Vue will:
A typical CSS transition looks like this:

-<div v-if="show" transition="expand">hello</div>
+<div id="app">
+    <div v-if="show" transition="expand">hello</div>
+    <button @click="toggle">botao</button>

I mean, we should probably use toggle here so everyone can understand?


Reply to this email directly or view it on GitHub
https://github.com/vuejs/vuejs.org/pull/237/files#r53048528.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use English language, @jhserodio ! I don't understand what botao means. - This is what Evan means.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, botao = button, my fault

2016-02-17 4:22 GMT-02:00 Azamat notifications@github.com:

In src/guide/transitions.md
#237 (comment):

@@ -35,7 +35,10 @@ When an element with transition is inserted or removed, Vue will:
A typical CSS transition looks like this:

-<div v-if="show" transition="expand">hello</div>
+<div id="app">
+    <div v-if="show" transition="expand">hello</div>
+    <button @click="toggle">botao</button>

Use English language, @jhserodi B95B o https://github.com/jhserodio ! I
don't understand what does botao mean. - This is what Evan means.


Reply to this email directly or view it on GitHub
https://github.com/vuejs/vuejs.org/pull/237/files#r53125080.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jhserodio fix that please 👍

</div>
```

You also need to define CSS rules for `.expand-transition`, `.expand-enter` and `.expand-leave` classes:
Expand All @@ -62,6 +65,18 @@ You also need to define CSS rules for `.expand-transition`, `.expand-enter` and
In addition, you can provide JavaScript hooks:

``` js
new Vue({
el: '#app',
data: {
show: true
},
methods: {
toggle: function () {
this.show = !this.show
}
}
})

Vue.transition('expand', {

beforeEnter: function (el) {
Expand Down
0