diff --git a/hello/app.js b/hello/app.js index db7aaea..08028bc 100644 --- a/hello/app.js +++ b/hello/app.js @@ -20,5 +20,10 @@ var app = new Vue({ reverseMessage: function () { this.message = this.message.split('').reverse().join('') } + }, + computed: { + lenMessage: function () { + return this.message.length + } } }) diff --git a/hello/index.html b/hello/index.html index 88d7c88..27922ad 100644 --- a/hello/index.html +++ b/hello/index.html @@ -27,7 +27,7 @@ - + {{ lenMessage }}