Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Maria Dan
Added: May 27, 2021 4:44 PM
Views: 193
Tags: no tags
  1. new Vue({
  2.   el: "#app",
  3.   data: {
  4.     firstName: 'Alex',
  5.     secondName: 'Zhaliazouski',
  6.     fullName: '',
  7.     counter: 0
  8.   },
  9.   methods: {
  10.     onClick() {
  11.       this.counter++
  12.       console.log(this.counter);
  13.     }
  14.   },
  15.   computed: {
  16.     getFullName() {
  17.     console.log('test')
  18.         return this.firstName.toUpperCase() + ' ' + this.secondName.toUpperCase()
  19.     }
  20.   }
  21. })