mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 03:27:05 -04:00
Basic setup for Vue app
This commit is contained in:
parent
a06fad974e
commit
99dd107724
7 changed files with 56 additions and 1 deletions
21
public/js/components/HelloWorld.vue
Normal file
21
public/js/components/HelloWorld.vue
Normal file
|
@ -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>
|
|
@ -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">\
|
||||
|
|
15
public/js/views/Cover.vue
Normal file
15
public/js/views/Cover.vue
Normal file
|
@ -0,0 +1,15 @@
|
|||
<template>
|
||||
<hello-world />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HelloWorld from '../components/HelloWorld';
|
||||
|
||||
export default {
|
||||
name: 'Cover',
|
||||
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue