🎨 Site > Store > Separate into modules
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
<template src="./template.html"></template>
|
||||
<script src="./script.js"></script>
|
||||
<style src="./style.styl" lang="stylus"></style>
|
||||
@@ -1,25 +0,0 @@
|
||||
export default
|
||||
{
|
||||
name: 'projects-hub',
|
||||
|
||||
computed:
|
||||
{
|
||||
projects()
|
||||
{
|
||||
return this.$store.state.projects
|
||||
}
|
||||
},
|
||||
|
||||
created()
|
||||
{
|
||||
|
||||
},
|
||||
|
||||
methods:
|
||||
{
|
||||
onProjectClick(projectSlug)
|
||||
{
|
||||
this.$store.commit('setProject', projectSlug)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
<div>
|
||||
<a href="#" v-for="project in projects" @click.prevent="onProjectClick(project.slug)">
|
||||
{{ project.name }}
|
||||
</a>
|
||||
</div>
|
||||
Reference in New Issue
Block a user