Skip to content

Commit e61a018

Browse files
committed
update examples with new transition api
1 parent 6672481 commit e61a018

File tree

2 files changed

+30
-26
lines changed

2 files changed

+30
-26
lines changed

examples/firebase/index.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99
<!-- Firebase -->
1010
<script src="https://cdn.firebase.com/js/client/2.4.2/firebase.js"></script>
1111
<!-- VueFire -->
12-
<script src="https://cdn.jsdelivr.net/vuefire/1.0.1/vuefire.min.js"></script>
12+
<script src="https://cdn.jsdelivr.net/vuefire/1.2.0/vuefire.min.js"></script>
1313
</head>
1414
<body>
1515
<div id="app">
1616
<ul>
17-
<li class="user" v-for="user in users" transition>
18-
<span>{{user.name}} - {{user.email}}</span>
19-
<button v-on:click="removeUser(user)">X</button>
20-
</li>
17+
<transition v-for="user in users" :key="user['.key']">
18+
<li class="user">
19+
<span>{{user.name}} - {{user.email}}</span>
20+
<button v-on:click="removeUser(user)">X</button>
21+
</li>
22+
</transition>
2123
</ul>
2224
<form id="form" v-on:submit.prevent="addUser">
2325
<input v-model="newUser.name">

examples/modal/index.html

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,35 @@
99
<body>
1010
<!-- template for the modal component -->
1111
<script type="text/x-template" id="modal-template">
12-
<div class="modal-mask" transition="modal">
13-
<div class="modal-wrapper">
14-
<div class="modal-container">
12+
<transition name="modal">
13+
<div class="modal-mask">
14+
<div class="modal-wrapper">
15+
<div class="modal-container">
1516

16-
<div class="modal-header">
17-
<slot name="header">
18-
default header
19-
</slot>
20-
</div>
17+
<div class="modal-header">
18+
<slot name="header">
19+
default header
20+
</slot>
21+
</div>
2122

22-
<div class="modal-body">
23-
<slot name="body">
24-
default body
25-
</slot>
26-
</div>
23+
<div class="modal-body">
24+
<slot name="body">
25+
default body
26+
</slot>
27+
</div>
2728

28-
<div class="modal-footer">
29-
<slot name="footer">
30-
default footer
31-
<button class="modal-default-button" @click="$emit('close')">
32-
OK
33-
</button>
34-
</slot>
29+
<div class="modal-footer">
30+
<slot name="footer">
31+
default footer
32+
<button class="modal-default-button" @click="$emit('close')">
33+
OK
34+
</button>
35+
</slot>
36+
</div>
3537
</div>
3638
</div>
3739
</div>
38-
</div>
40+
</transition>
3941
</script>
4042

4143
<!-- app -->

0 commit comments

Comments
 (0)