Add work in progress.

This commit is contained in:
Lukáš Kucharczyk 2020-08-25 12:53:45 +02:00
parent ee4549cd9b
commit 3fee95d84f
5 changed files with 55 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

5
.prettierrc.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
tabWidth: 2,
semi: false,
singleQuote: true,
};

14
src/App.vue Normal file
View File

@ -0,0 +1,14 @@
<template>
<div id="app">
<NoteList />
</div>
</template>
<script>
import NoteList from '@/components/NoteList.vue'
export default {
components: {
NoteList
}
}
</script>

View File

@ -0,0 +1,31 @@
<template>
<textarea
@keyup.enter="addNote"
v-model="content"
cols="30"
rows="10"
></textarea>
<button type="submit" @click="addNote">
Submit
</button>
<div v-for="note in notes" :key="note.id">{{ note.text }}</div>
</template>
<script>
export default {
data() {
return {
notes: [{ id: 1, text: 'This is a note' }],
content: 'Start typing something…'
}
},
methods: {
addNote() {
this.notes.push({ id: 2, text: this.content })
this.content = ''
}
}
}
</script>
<style></style>

4
src/main.js Normal file
View File

@ -0,0 +1,4 @@
import { createApp } from 'vue'
import App from './App.vue'
const mounted = createApp(App).mount('#app') // eslint-disable-line