Skip to content

Instantly share code, notes, and snippets.

@aldarund
Last active September 16, 2018 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aldarund/8d555c3ddf11010579acda6aada81e5c to your computer and use it in GitHub Desktop.
Save aldarund/8d555c3ddf11010579acda6aada81e5c to your computer and use it in GitHub Desktop.
<template>
<div>Hi</div>
</template>
<script>
export default {
name: "MinimalComponent",
mounted() {
console.log('MinimalComponent mounted32')
}
}</script>
------
<template>
<div>
<minimal-component/>
<div v-for="(section, i) in home.sections" :key="i">
</div>
</div>
</template>
<script>
import Vue from 'vue'
import MinimalComponent from '../components/MinimalComponent'
const bus = new Vue()
export default {
components: {
MinimalComponent: MinimalComponent,
},
async fetch(context) {
bus.home = {
sections: [
{items: []}
]
}
},
computed: {
home() {
return bus.home || {}
},
},
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment