add vue-mongotest vue js app component

This commit is contained in:
2021-07-04 22:59:11 +01:00
parent 37aa699eb9
commit c2dfe291c2
13 changed files with 29827 additions and 6 deletions
+39
View File
@@ -0,0 +1,39 @@
<template>
<container class="app">
<h1>{{ title }}</h1>
<Button text="Test Mongo" />
</container>
</template>
<script>
import Button from './components/Button'
export default {
name: 'App',
props: {
title: {
type: String,
default: 'Hello World!'
}
},
components: {
Button
},
data () {
return {
task: []
}
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

+18
View File
@@ -0,0 +1,18 @@
<template>
<button @click="onClick()" class="btn">{{ text }}</button>
</template>
<script>
export default {
name: 'Button',
props: {
text: String,
name: String
},
methods: {
onClick() {
console.log(this.text + ' button clicked')
}
}
}
</script>
+4
View File
@@ -0,0 +1,4 @@
import { createApp } from 'vue'
import App from './App.vue'
createApp(App).mount('#app')