Created
August 20, 2017 18:14
-
-
Save AlexeyKot/a3159f4c7321fc022eb70c9f6088d03c to your computer and use it in GitHub Desktop.
Revisions
-
AlexeyKot created this gist
Aug 20, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ <!DOCTYPE html> <html> <head> <title>Computed Property</title> </head> <body> <div id="app"> <h1>Ваш возраст</h1> <input v-model="age" type="text"> <a v-if="age18" id="_14" href="#">Перейдите по ссылке</a> </div> </body> <script src="https://vuejs.org/js/vue.js"></script> <script> new Vue({ el: '#app', data: { age: "" }, computed: { age18: function () { return this.age == "18" } } }) </script> </html>