This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/basics-05-using-the-native-.../app.js

26 lines
511 B
JavaScript

const app = Vue.createApp({
data() {
return {
counter: 0,
name: "",
};
},
methods: {
setName(event, lastName) {
this.name = event.target.value;
},
add(num) {
this.counter = this.counter + num;
},
reduce(num) {
this.counter = this.counter - num;
// this.counter--;
},
resetInput() {
this.name = "";
},
},
});
app.mount("#events");