diff --git a/examples/commits/app.js b/examples/commits/app.js index 7b1f03d3..029d660a 100644 --- a/examples/commits/app.js +++ b/examples/commits/app.js @@ -22,14 +22,17 @@ var demo = new Vue({ currentBranch: 'fetchData' }, - methods: { + filters: { truncate: function (v) { var newline = v.indexOf('\n') return newline > 0 ? v.slice(0, newline) : v }, formatDate: function (v) { return v.replace(/T|Z/g, ' ') - }, + } + }, + + methods: { fetchData: function () { var xhr = new XMLHttpRequest() var self = this diff --git a/examples/commits/index.html b/examples/commits/index.html index 2c8e7d30..a80eaa46 100644 --- a/examples/commits/index.html +++ b/examples/commits/index.html @@ -29,15 +29,15 @@ :value="branch" name="branch" v-model="currentBranch"> - + -

vuejs/vue@{{currentBranch}}

+

vuejs/vue@{{ currentBranch }}

diff --git a/examples/grid/grid.js b/examples/grid/grid.js index bef40578..8566f1eb 100644 --- a/examples/grid/grid.js +++ b/examples/grid/grid.js @@ -40,10 +40,12 @@ Vue.component('demo-grid', { return data } }, - methods: { + filters: { capitalize: function (str) { return str.charAt(0).toUpperCase() + str.slice(1) - }, + } + }, + methods: { sortBy: function (key) { this.sortKey = key this.sortOrders[key] = this.sortOrders[key] * -1 diff --git a/examples/grid/index.html b/examples/grid/index.html index a371df33..c9d58fd4 100644 --- a/examples/grid/index.html +++ b/examples/grid/index.html @@ -16,7 +16,7 @@ - {{ capitalize(key) }} + {{ key | capitalize }} diff --git a/examples/markdown/index.html b/examples/markdown/index.html index 56b8e50b..f253bfe4 100644 --- a/examples/markdown/index.html +++ b/examples/markdown/index.html @@ -12,7 +12,7 @@
-
+