More fun with vue
This commit is contained in:
43
vuefun/src/App.vue
Normal file
43
vuefun/src/App.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<h1>{{ greeting }}</h1>
|
||||
<p>{{ message }}</p>
|
||||
<input v-model="message">
|
||||
<p class="container__frig">rendered: {{ frig }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import 'normalize.css'
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
frig() {
|
||||
return new Date() + '';
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
message: 'welp',
|
||||
greeting: 'yoiks',
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
body {
|
||||
color: white;
|
||||
background: black;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 2rem;
|
||||
|
||||
&__frig {
|
||||
font-size: .8rem;
|
||||
color: gray;
|
||||
}
|
||||
}
|
||||
</style>
|
9
vuefun/src/index.html
Normal file
9
vuefun/src/index.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>vuefun</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
8
vuefun/src/index.js
Normal file
8
vuefun/src/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
template: '<App/>',
|
||||
components: { App },
|
||||
})
|
Reference in New Issue
Block a user