diff options
Diffstat (limited to '')
-rw-r--r-- | public/js/components/HelloWorld.vue | 21 | ||||
-rw-r--r-- | public/js/cover.js | 6 | ||||
-rw-r--r-- | public/js/views/Cover.vue | 15 |
3 files changed, 42 insertions, 0 deletions
diff --git a/public/js/components/HelloWorld.vue b/public/js/components/HelloWorld.vue new file mode 100644 index 00000000..d8e3007f --- /dev/null +++ b/public/js/components/HelloWorld.vue @@ -0,0 +1,21 @@ +<template> + <h1>{{ message }}</h1> +</template> + +<script> +export default { + name: 'HelloWorld', + + data() { + return { + message: 'Hello Vue' + } + } +} +</script> + +<style scoped> +h1 { + color: blue; +} +</style> diff --git a/public/js/cover.js b/public/js/cover.js index 4696203e..b8886849 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -28,8 +28,14 @@ var saveAs = require('file-saver').saveAs; var List = require('list.js'); var S = require('string'); +import Cover from './views/Cover'; import Vue from 'vue'; +new Vue({ + el: '#cover-app', + render: (h) => h(Cover) +}) + var options = { valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'], item: '<li class="col-xs-12 col-sm-6 col-md-6 col-lg-4">\ diff --git a/public/js/views/Cover.vue b/public/js/views/Cover.vue new file mode 100644 index 00000000..767d087f --- /dev/null +++ b/public/js/views/Cover.vue @@ -0,0 +1,15 @@ +<template> + <hello-world /> +</template> + +<script> +import HelloWorld from '../components/HelloWorld'; + +export default { + name: 'Cover', + + components: { + HelloWorld + } +} +</script> |