diff --git a/examples/commits/app.js b/examples/commits/app.js index 7b1f03d35..029d660a5 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 2c8e7d30f..a80eaa460 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 bef40578f..8566f1ebc 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 a371df333..c9d58fd4f 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 56b8e50b7..f253bfe4d 100644 --- a/examples/markdown/index.html +++ b/examples/markdown/index.html @@ -12,7 +12,7 @@
-
+