From f0f9acb0eba11c72fea9c7c217065d5120509ecc Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Mon, 16 Apr 2018 23:10:28 -0400 Subject: [PATCH] s6e91 first component --- lessons/app.js | 42 ++++++++++-------------------------------- lessons/index.html | 7 ++++--- vue-cli/src/App.vue | 1 + 3 files changed, 15 insertions(+), 35 deletions(-) diff --git a/lessons/app.js b/lessons/app.js index 0ed8cb2..4f6aaf0 100644 --- a/lessons/app.js +++ b/lessons/app.js @@ -1,35 +1,13 @@ +Vue.component('ts-cmp',{ + data() { + return { + status: "Critical!", + }; + }, + template: '

Server status {{ status }}

' +}); + var app = new Vue({ el: '#app', - data: { - title: "The VueJS nstance" - }, - beforeCreate(){ - console.log("Created"); - }, - created(){ - console.log("created"); - }, - beforeMount(){ - console.log("beforeMount"); - }, - mounted(){ - console.log("mounted"); - }, - beforeUpdate(){ - console.log("before update"); - }, - updated(){ - console.log("updated"); - }, - beforeDestroy(){ - console.log("before destroy"); - }, - destroyed(){ - console.log("destroyed"); - }, - methods:{ - destroy(){ - this.$destroy(); - } - } + }); diff --git a/lessons/index.html b/lessons/index.html index 2425457..2358b71 100644 --- a/lessons/index.html +++ b/lessons/index.html @@ -7,9 +7,10 @@
- {{title}} - - + +
+ +
diff --git a/vue-cli/src/App.vue b/vue-cli/src/App.vue index 8ad3e80..b092b41 100644 --- a/vue-cli/src/App.vue +++ b/vue-cli/src/App.vue @@ -6,6 +6,7 @@