Skip to content

Commit 276dc28

Browse files
committed
update examples for new syntax
1 parent 305a491 commit 276dc28

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

examples/grid/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
<thead>
1515
<tr>
1616
<th v-for="key in columns"
17-
@click="sortBy(key)"
18-
v-class="{active: sortKey == key}">
17+
v-on:click="sortBy(key)"
18+
v-bind:class="{active: sortKey == key}">
1919
{{key | capitalize}}
2020
<span class="arrow"
21-
v-class="reversed[key] ? 'dsc' : 'asc'">
21+
v-bind:class="reversed[key] ? 'dsc' : 'asc'">
2222
</span>
2323
</th>
2424
</tr>

examples/modal/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
default footer
3131
<button
3232
class="modal-default-button"
33-
@click="show = false">
33+
v-on:click="show = false">
3434
OK
3535
</button>
3636
</slot>
@@ -56,9 +56,9 @@
5656

5757
<!-- app -->
5858
<div id="app">
59-
<button id="show-modal" @click="showModal = true">Show Modal</button>
59+
<button id="show-modal" v-on:click="showModal = true">Show Modal</button>
6060
<!-- use the modal component, pass in the prop -->
61-
<modal :show&="showModal">
61+
<modal :show.sync="showModal">
6262
<!--
6363
you can use custom content here to overwrite
6464
default content

examples/svg/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
<label>{{stat.label}}</label>
3939
<input type="range" v-model="stat.value" min="0" max="100">
4040
<span>{{stat.value}}</span>
41-
<button @click="remove(stat)">X</button>
41+
<button v-on:click="remove(stat)">X</button>
4242
</div>
4343
<form id="add">
4444
<input name="newlabel" v-model="newLabel">
45-
<button @click="add">Add a Stat</button>
45+
<button v-on:click="add">Add a Stat</button>
4646
</form>
4747
<pre id="raw">{{stats | json}}</pre>
4848
</div>

examples/todomvc/index.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ <h1>todos</h1>
1414
autofocus autocomplete="off"
1515
placeholder="What needs to be done?"
1616
v-model="newTodo"
17-
@keyup:enter="addTodo">
17+
v-on:keyup.enter="addTodo">
1818
</header>
1919
<section class="main" v-show="todos.length" v-cloak>
2020
<input class="toggle-all" type="checkbox" v-model="allDone">
2121
<ul class="todo-list">
2222
<li class="todo"
2323
v-for="todo in filteredTodos"
24-
v-class="{completed: todo.completed, editing: todo == editedTodo}">
24+
v-bind:class="{completed: todo.completed, editing: todo == editedTodo}">
2525
<div class="view">
2626
<input class="toggle" type="checkbox" v-model="todo.completed">
27-
<label @dblclick="editTodo(todo)">{{todo.title}}</label>
28-
<button class="destroy" @click="removeTodo(todo)"></button>
27+
<label v-on:dblclick="editTodo(todo)">{{todo.title}}</label>
28+
<button class="destroy" v-on:click="removeTodo(todo)"></button>
2929
</div>
3030
<input class="edit" type="text"
3131
v-model="todo.title"
3232
v-todo-focus="todo == editedTodo"
33-
@blur="doneEdit(todo)"
34-
@keyup:enter="doneEdit(todo)"
35-
@keyup:esc="cancelEdit(todo)">
33+
v-on:blur="doneEdit(todo)"
34+
v-on:keyup.enter="doneEdit(todo)"
35+
v-on:keyup.esc="cancelEdit(todo)">
3636
</li>
3737
</ul>
3838
</section>
@@ -41,11 +41,11 @@ <h1>todos</h1>
4141
<strong v-text="remaining"></strong> {{remaining | pluralize 'item'}} left
4242
</span>
4343
<ul class="filters">
44-
<li><a href="#/all" v-class="{selected: visibility == 'all'}">All</a></li>
45-
<li><a href="#/active" v-class="{selected: visibility == 'active'}">Active</a></li>
46-
<li><a href="#/completed" v-class="{selected: visibility == 'completed'}">Completed</a></li>
44+
<li><a href="#/all" v-bind:class="{selected: visibility == 'all'}">All</a></li>
45+
<li><a href="#/active" v-bind:class="{selected: visibility == 'active'}">Active</a></li>
46+
<li><a href="#/completed" v-bind:class="{selected: visibility == 'completed'}">Completed</a></li>
4747
</ul>
48-
<button class="clear-completed" @click="removeCompleted" v-show="todos.length > remaining">
48+
<button class="clear-completed" v-on:click="removeCompleted" v-show="todos.length > remaining">
4949
Clear completed
5050
</button>
5151
</footer>

examples/tree/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<script type="text/x-template" id="item-template">
2929
<li>
3030
<div
31-
v-class="{bold: isFolder}"
31+
v-bind:class="{bold: isFolder}"
3232
v-on:click="toggle"
3333
v-on:dblclick="changeType">
3434
{{model.name}}
@@ -40,7 +40,7 @@
4040
v-for="model in model.children"
4141
:model="model">
4242
</item>
43-
<li @click="addChild">+</li>
43+
<li v-on:click="addChild">+</li>
4444
</ul>
4545
</li>
4646
</script>

0 commit comments

Comments
 (0)